/*
  Azaza Match (아자아자 매치) web pages: one stylesheet for every page.
  Static, no web fonts, no external files. Mobile first (360px and up),
  content at most 760px wide. Colors from the game's palette
  (Aza_Match_Client/lib/theme/aza_colors.dart).
*/

:root {
  color-scheme: light;
  --ink: #2a2466;          /* AzaColors.ink */
  --ink-soft: #5d5a78;
  --indigo: #2e3192;       /* AzaColors.indigo */
  --stage-top: #5d66f2;    /* AzaColors.stageTop */
  --stage-bottom: #7d5cf0; /* AzaColors.stageBottom */
  --grape: #8f7bff;        /* AzaColors.grape */
  --grape-deep: #5b49c9;   /* AzaColors.grapeDeep */
  --coral: #f0492c;        /* AzaColors.coral */
  --coral-light: #ff8e63;  /* AzaColors.coralLight */
  --sun: #ffc83d;          /* AzaColors.sun */
  --sun-light: #ffe06a;    /* AzaColors.sunLight */
  --mint: #2fd6a8;         /* AzaColors.mint */
  --mint-deep: #10a98a;    /* AzaColors.mintDeep */
  --ice: #337df4;          /* tile: ice */
  --leaf: #2bae4e;         /* tile: leaf */
  --cream: #fff7e6;        /* AzaColors.cream */
  --bg: #f5f3ff;
  --card: #ffffff;
  --line: #e3e0f5;
  --th: #f0eefb;
  --link: #4b3bc0;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(46, 49, 146, .06), 0 10px 28px rgba(46, 49, 146, .10);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font);
  word-break: keep-all;      /* Korean breaks between words, not inside them */
  overflow-wrap: break-word;
}

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

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--coral); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--sun); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 8px; }

/* ---------- Top: the sunburst of the game ---------- */

.top {
  color: #fff;
  background:
    repeating-conic-gradient(from -3deg at 50% -10%, rgba(255, 255, 255, .085) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 15deg),
    linear-gradient(160deg, var(--stage-top) 0%, var(--stage-bottom) 100%);
  padding-bottom: 18px;
}
.top a { color: #fff; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }

.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 6px rgba(18, 20, 61, .25); flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: var(--sun-light); }

.lang {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(18, 20, 61, .22); border: 1px solid rgba(255, 255, 255, .35);
  font-size: .875rem; font-weight: 700; text-decoration: none; line-height: 1.4;
}
.lang:hover { background: rgba(18, 20, 61, .35); color: #fff; }
.lang svg { width: 16px; height: 16px; flex: none; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 2px; margin-top: 10px; padding: 0 8px; }
.nav a {
  padding: 4px 8px; border-radius: 999px;
  font-size: .875rem; font-weight: 700; text-decoration: none; opacity: .92; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .16); opacity: 1; color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .95); color: var(--grape-deep); opacity: 1; }

/* Page title band on the inner pages. */
.page-head { padding-top: 18px; }
.page-head h1 { margin: 0; font-size: 1.6rem; line-height: 1.3; letter-spacing: -.02em; text-shadow: 0 2px 0 rgba(18, 20, 61, .18); }
.page-head p { margin: 6px 0 0; opacity: .92; font-size: .95rem; }

/* ---------- Home hero ---------- */

.hero { padding-top: 16px; }
.feature {
  width: 100%; border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(18, 20, 61, .18), 0 16px 34px rgba(18, 20, 61, .28);
  aspect-ratio: 1024 / 500;
}

.intro {
  position: relative;
  margin: 12px 0 0;
  padding: 18px 18px 20px;
  background: var(--card); color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 76px 1fr; gap: 4px 14px; align-items: center;
}
.intro .app-icon { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 3px 0 rgba(46, 49, 146, .12), 0 6px 14px rgba(46, 49, 146, .22); }
.intro h1 { margin: 0; font-size: 1.55rem; line-height: 1.2; letter-spacing: -.02em; color: var(--indigo); }
.intro .alt-name { margin: 2px 0 0; color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.intro .pitch { grid-column: 1 / -1; margin: 12px 0 0; font-size: 1.05rem; font-weight: 700; line-height: 1.55; }
.intro .pitch br.wide { display: none; }
.intro .actions { grid-column: 1 / -1; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.status {
  margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--cream); color: #7a3a00; border: 2px solid var(--sun);
  font-weight: 800; font-size: .95rem; line-height: 1.3;
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(240, 73, 44, .18); flex: none; }

/* ---------- Main content ---------- */

main { display: block; padding: 22px 0 8px; }

.section { margin: 0 0 26px; }
.section > h2, .doc h2 {
  font-size: 1.25rem; line-height: 1.35; letter-spacing: -.01em; margin: 0 0 10px; color: var(--indigo);
}
.lead { font-size: 1.05rem; margin: 0 0 12px; }
.lead + h2 { margin-top: 22px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.story { border-left: 6px solid var(--sun); }
.story h2 { font-size: 1.15rem; line-height: 1.4; margin: 0 0 10px; color: var(--indigo); letter-spacing: -.01em; }
.story p { margin: 0 0 10px; }

/* Feature points */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
/* Phones: the badge beside the title, the text under both at full width. */
.feature-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px 12px; align-items: center; }
.feature-text { display: contents; }
.feature-item h3 { margin: 0; font-size: 1.08rem; line-height: 1.4; }
.feature-item p { grid-column: 1 / -1; margin: 0; color: #3f3a72; font-size: .97rem; }
.feature-item .badge { width: 44px; height: 44px; border-radius: 13px; }
.feature-item .badge svg { width: 26px; height: 26px; }
.badge {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14);
}
.badge svg { width: 28px; height: 28px; }
.b-coral { background: linear-gradient(180deg, var(--coral-light), var(--coral)); }
.b-ice { background: linear-gradient(180deg, #8ccbff, var(--ice)); }
.b-sun { background: linear-gradient(180deg, var(--sun-light), #ffb01f); }
.b-grape { background: linear-gradient(180deg, var(--grape), var(--grape-deep)); }
.b-mint { background: linear-gradient(180deg, #4fe3be, var(--mint-deep)); }

/* Small facts as chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: .92rem; font-weight: 700; color: #3f3a72; line-height: 1.4;
}

/* Link cards */
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); border: 2px solid transparent;
}
.links a:hover { border-color: var(--grape); color: var(--ink); }
.links strong { font-size: 1.02rem; }
.links span { grid-column: 1; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.links .arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--grape-deep); font-size: 1.3rem; font-weight: 800; }

/* Contact box */
.contact { display: grid; gap: 10px; }
.contact a.big {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  border: 2px solid transparent; min-width: 0;
}
.contact a.big:hover { border-color: var(--grape); }
.contact .badge { width: 44px; height: 44px; flex: none; }
.contact .badge svg { width: 24px; height: 24px; }
.contact strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.contact small { display: block; color: var(--ink-soft); font-size: .88rem; }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps > li {
  counter-increment: step; position: relative; padding: 0 0 0 44px; min-height: 32px;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--coral-light), var(--coral)); color: #fff; font-weight: 800; font-size: .95rem;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14);
}

.ui { /* words as they appear in the app */
  padding: 1px 4px; border-radius: 6px; background: var(--th); color: var(--grape-deep); font-weight: 700;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.note {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 14px;
  background: var(--cream); border: 1px solid #f5dfae; font-size: .95rem;
}
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

.after { margin: 12px 2px 0; }
.card p.more { margin: 10px 0 0; }

ul.dots { margin: 0; padding-left: 1.2em; }
ul.dots li { margin: 0 0 6px; }
ul.dots li::marker { color: var(--coral); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; position: relative;
  font-weight: 800; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--th); color: var(--grape-deep); font-weight: 800; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; background: var(--grape-deep); color: #fff; }
.faq .answer { padding: 0 16px 14px; }
.faq .answer > :first-child { margin-top: 0; }
.faq .answer > :last-child { margin-bottom: 0; }
.faq .answer p { margin: 0 0 8px; }

/* Two lists side by side on wide screens */
.split { display: grid; gap: 12px; align-items: start; }
.split h3 { margin: 0 0 8px; font-size: 1.05rem; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 800; vertical-align: 2px; margin-right: 6px; }
.tag-del { background: #ffe2dc; color: #b1260f; }
.tag-keep { background: #e2e9ff; color: #2a4fb0; }

/* ---------- Document pages (privacy policy) ---------- */

.doc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px 24px; }
.doc .meta { color: var(--ink-soft); font-size: .93rem; margin: 0 0 14px; }
.doc .url { overflow-wrap: anywhere; word-break: break-all; }
.doc .summary { background: var(--cream); border: 1px solid #f5dfae; border-radius: 14px; padding: 12px 14px; }
.doc h2 { margin: 1.9em 0 .55em; padding-top: .9em; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.02rem; margin: 1.4em 0 .4em; color: var(--ink); }
.doc p { margin: 0 0 .8em; }
.doc ul { padding-left: 1.25em; margin: 0 0 .9em; }
.doc li { margin: 0 0 .35em; }
.doc li::marker { color: var(--grape-deep); }
.doc a { overflow-wrap: anywhere; }
.toc { margin: 0 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--th); }
.toc strong { display: block; margin-bottom: 4px; font-size: .93rem; }
.toc ol { margin: 0; padding-left: 1.5em; columns: 1; font-size: .93rem; }
.toc li { margin: 0 0 2px; }

table { width: 100%; border-collapse: collapse; margin: .5em 0 1em; font-size: .95rem; line-height: 1.6; }
th, td { border: 1px solid #dcd8f0; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--th); font-weight: 700; }
table.kv th { width: 27%; }
table.list thead th:first-child { width: 32%; }

:target { scroll-margin-top: 12px; }

/* Narrow screens: a two-column table reads better as one box of labelled rows. */
@media (max-width: 559px) {
  table.kv, table.kv tbody, table.kv tr, table.kv th, table.kv td,
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: auto; }
  table.kv, table.list { border: 1px solid #dcd8f0; border-radius: 12px; overflow: hidden; }
  table.kv th, table.kv td, table.list td { border: 0; }
  table.kv th, table.list thead th:first-child { width: auto; }
  table.kv tr + tr, table.list tbody tr + tr { border-top: 1px solid #dcd8f0; }
  table.kv th, table.list td:first-child {
    background: none; color: var(--grape-deep); font-size: .86rem; font-weight: 800; padding: 10px 12px 0;
  }
  table.kv td, table.list td + td { padding: 2px 12px 10px; }
  table.list thead { display: none; }
}

/* ---------- Footer ---------- */

.foot { margin-top: 30px; padding: 24px 0 30px; background: #ece9fb; color: #4a466e; font-size: .88rem; line-height: 1.65; }
.foot p { margin: 0 0 4px; }
.foot .co { font-weight: 800; color: var(--ink); font-size: .95rem; margin-bottom: 6px; }
.foot a { color: #4a466e; }
.foot a:hover { color: var(--coral); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 10px; font-weight: 700; }
.foot .copy { margin-top: 8px; color: #6c688f; }

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 24px; }
  .bar { padding-top: 16px; }
  .brand img { width: 40px; height: 40px; }
  .nav { margin-top: 12px; padding: 0 16px; }
  .page-head { padding-top: 26px; }
  .page-head h1 { font-size: 2rem; }
  .top { padding-bottom: 26px; }
  .hero { padding-top: 22px; }
  .intro { margin: -36px 28px 0; padding: 22px 24px 24px; grid-template-columns: 96px 1fr; gap: 4px 18px; }
  .intro .app-icon { width: 96px; height: 96px; border-radius: 24px; }
  .intro h1 { font-size: 2rem; }
  .intro .pitch { font-size: 1.12rem; }
  .intro .pitch br.wide { display: inline; }
  main { padding-top: 30px; }
  .section { margin-bottom: 34px; }
  .section > h2 { font-size: 1.4rem; }
  .story h2 { font-size: 1.3rem; }
  .features { grid-template-columns: 1fr 1fr; gap: 14px; }
  .feature-item { align-content: start; }
  .features .card { height: 100%; }
  .links { grid-template-columns: repeat(3, 1fr); }
  .links a { grid-template-columns: 1fr; align-content: start; height: 100%; }
  .links .arrow { display: none; }
  .contact { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .doc { padding: 28px 32px 32px; }
  .toc ol { columns: 2; column-gap: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  .links a, .contact a.big { transition: border-color .15s ease, transform .15s ease; }
  .links a:hover, .contact a.big:hover { transform: translateY(-2px); }
}

@media print {
  .top { background: none; color: var(--ink); padding-bottom: 0; }
  .top a { color: var(--ink); }
  .nav, .lang, .skip, .foot-nav { display: none; }
  .doc, .card { box-shadow: none; border: 1px solid var(--line); }
  body { background: #fff; }
}

/* A button (a mail link that starts a request). */
.cta { margin: 16px 0 0; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  background: linear-gradient(180deg, var(--coral-light), var(--coral)); color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 4px 12px rgba(240, 73, 44, .25);
}
.btn:hover { color: #fff; filter: brightness(1.05); }
