/* Korea Starter Kit — 지원금모야와 같은 결 (2026-10-15 회장님 「그냥 깔끔하게 지원금모야처럼 파란색으로 가자」).
 * Values = 지원금모야 preset (앱형\site\config\preset_toss.json · 규격_토스뱅크.md): grey100 page, white cards (radius 20,
 * no border, no shadow), blue #3182F6 only for the next action and "selected", Pretendard, type t1–t7, buttons 56/48 radius 14.
 * Blue *text* uses blue700 #1B64DA (5.4:1). No decoration patterns. Previous Korean-traditional version: ..\_old_hanji\.
 * Same values as the site: 블로그\신규3사이트\koreastarterkit\brand\brand.json "brand". Mobile first (390px). */
:root {
  color-scheme: light;
  --grey50: #f9fafb; --grey100: #f2f4f6; --grey200: #e5e8eb; --grey300: #d1d6db; --grey400: #b0b8c1;
  --grey500: #8b95a1; --grey600: #6b7684; --grey700: #4e5968; --grey800: #333d4b; --grey900: #191f28;
  --blue50: #e8f3ff; --blue100: #c9e2ff; --blue300: #64a8ff; --blue500: #3182f6; --blue600: #2272eb; --blue700: #1b64da;
  --red50: #ffeeee; --red500: #f04452; --red-ink: #d22030;   /* red text 5.3:1 on white */
  --bg: var(--grey100); --card: #fff; --text: var(--grey900); --text2: var(--grey700); --caption: var(--grey600);
  --line: var(--grey200); --primary: var(--blue500); --primary-hover: var(--blue600); --primary-ink: var(--blue700);
  --weak-bg: var(--blue50); --weak-text: var(--blue700);
  --r-card: 20px; --r-btn: 14px; --r-input: 14px; --r-chip: 999px;
  --gutter: 20px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* Japanese: Pretendard carries Korean-style hanja, so kana/kanji (and the Latin around them) use a Japanese face first */
:lang(ja) {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, system-ui, sans-serif;
  letter-spacing: 0;
  line-break: strict;
}
body:lang(ja) { line-height: 1.6; }
h1:lang(ja), h2:lang(ja), h3:lang(ja), .btn:lang(ja) { word-break: auto-phrase; }
/* Korean: keep words whole at line ends */
:lang(ko) { letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
body:lang(ko) { line-height: 1.55; }
h1, h2, h3, p { margin: 0; }
a { color: var(--primary-ink); }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
main:focus, h1:focus { outline: none; }
h1:focus-visible { outline: 3px solid var(--primary); }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- frame: white header · grey page · white footer ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px var(--gutter); padding-top: max(8px, env(safe-area-inset-top));
  background: var(--card);
}
.brand {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; flex-shrink: 0; white-space: nowrap;
  font-family: var(--font); /* Latin-only wordmark: always Pretendard, also on the Japanese screen */
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.02em;
}
.brand span, .brand b { font-family: inherit; letter-spacing: inherit; } /* beat :lang(ja)/:lang(ko) on the children */
.brand img { display: block; width: 28px; height: 28px; }
.brand b { color: var(--primary); font-weight: inherit; }
/* language picker = 지원금모야 「큰 글씨」 pill: white, grey line, round */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--card);
  color: var(--text2); font-weight: 600; font-size: 15px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--grey300); color: var(--text); }
/* the header language picker is a native <select> (works for 3+ languages); chevron drawn in CSS */
select.lang-toggle {
  -webkit-appearance: none; appearance: none; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  padding: 0 32px 0 14px; max-width: 46vw; white-space: nowrap;
  background-color: var(--card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e5968' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px 15px;
}
/* privacy page: language links (지원금모야 머리말 메뉴처럼 — 좁은 화면에서는 로고 아래 둘째 줄) */
.lang-links { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 15px; white-space: nowrap; }
.lang-links span { color: var(--grey400); }
.lang-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 10px; text-decoration: none; color: var(--text2); font-weight: 500; white-space: nowrap; word-break: keep-all; }
.lang-links a:hover { color: var(--text); background: var(--grey100); }
@media (max-width: 560px) {
  .top:has(.lang-links) { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
  .top .lang-links { flex: 0 0 100%; gap: 18px; margin-left: -8px; overflow-x: auto; scrollbar-width: none; }
  .top .lang-links::-webkit-scrollbar { display: none; }
  .top .lang-links span { display: none; }
}
main { flex: 1; padding: 20px var(--gutter) 8px; }
.pad { padding: 20px; }

.foot {
  margin-top: 40px; padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--card); color: var(--caption); font-size: 13px; line-height: 1.5;
}
.foot p + p { margin-top: 6px; }
.foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.foot nav a:hover { color: var(--text); }

/* ---------- common pieces ---------- */
.screen h1 { font-size: 26px; line-height: 35px; font-weight: 700; letter-spacing: -.02em; }
.lead { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--text2); }
.label { margin: 28px 0 10px; font-size: 15px; font-weight: 600; color: var(--text2); }
.hint { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--text2); }
.card .hint { color: var(--caption); }
.hint:empty { display: none; }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 8px -10px; padding: 0 10px;
  color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none; border-radius: 10px;
}
.back svg { width: 22px; height: 22px; }
.back:hover { background: var(--grey200); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-btn);
  font-size: 15px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  background: var(--grey100); color: var(--grey800);
  transition: background-color .15s;
}
.btn.block { display: flex; width: 100%; min-height: 56px; margin-top: 24px; font-size: 17px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover, .btn.primary:active { background: var(--primary-hover); }
/* ghost = 지원금모야 weak button (blue50 + blue700) */
.btn.ghost { background: var(--weak-bg); color: var(--weak-text); }
.btn.ghost:hover { background: var(--blue100); }
.btn.ghost.is-on { background: var(--weak-bg); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn.is-disabled, .btn.is-disabled:hover { background: var(--grey100); color: var(--grey400); cursor: not-allowed; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; margin-right: -10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--primary-ink);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.link-btn svg { width: 18px; height: 18px; }
.link-btn:hover { background: var(--weak-bg); }
.error { margin-top: 14px; color: var(--red-ink); font-size: 15px; font-weight: 500; }
.error:empty { display: none; }
.card { margin-bottom: 12px; padding: 20px; border-radius: var(--r-card); background: var(--card); }
.card h2 { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* ---------- screen 1: language ---------- */
.hero { padding-top: 4px; }
.hero-icon { display: block; width: 64px; height: 64px; margin: 0 0 20px -2px; }
.choices { display: grid; gap: 10px; margin-top: 4px; }
/* single choice = 지원금모야 선택지: white row, radius 20, selected = blue50 + blue500 border */
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 18px;
  border: 0; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 2px transparent;
  text-align: left; cursor: pointer; transition: box-shadow .15s, background-color .15s;
}
.choice:hover { background: var(--grey50); }
.choice.is-on { background: var(--weak-bg); box-shadow: inset 0 0 0 2px var(--primary); }
.choice-title { font-size: 17px; font-weight: 600; color: var(--text); }
.choice-lang .choice-title { flex: 1; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--grey500); display: grid; place-items: center; flex: none; background: #fff; }
.choice.is-on .radio { border-color: var(--primary); }
.choice.is-on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* ---------- screen 2: visiting / living ---------- */
.screen > h1 + .choices { margin-top: 24px; }
.choice-type { min-height: 88px; }
.choice-type > svg { color: var(--grey400); }
/* list-row icon = 44 circle, grey100 (지원금모야 목록 행) */
.choice-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--grey100); color: var(--grey700); display: grid; place-items: center; flex: none; }
.choice-ico svg { width: 24px; height: 24px; }
.choice.is-on .choice-ico { background: #fff; color: var(--primary); }
.choice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-sub { font-size: 15px; color: var(--text2); }

/* ---------- screen 3: dates ---------- */
form { margin-top: 8px; }
.field { margin-top: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--text2); }
.field input {
  display: block; width: 100%; min-height: 56px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-input); background: var(--card);
  font: inherit; font-size: 17px; color: var(--text);
}
.field input:hover { border-color: var(--grey300); }
.field input:focus { border-color: var(--primary); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--red500); }

/* ---------- screen 4: checklist ---------- */
.summary h1 { font-size: 22px; line-height: 31px; }
.sum-line { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 15px; color: var(--text2); }
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.progress { font-size: 15px; font-weight: 700; color: var(--primary-ink); }
.bar { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--grey100); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width .3s; }

.soon h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--red-ink); }
.soon h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red500); }
.soon ul { list-style: none; margin: 6px 0 0; padding: 0; }
.soon a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; }
.soon a:hover span:last-child { text-decoration: underline; }
.soon-when { flex: none; padding: 2px 9px; border-radius: var(--r-chip); background: var(--red50); color: var(--red-ink); font-size: 13px; font-weight: 700; }

.actions .btn.block { margin-top: 0; }
.actions #remindBtn { margin-top: 14px; }
/* small info box inside a card = 지원금모야 「준비물」 box */
.ios-hint { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--grey50); color: var(--text2); font-size: 14px; line-height: 1.5; }
.ios-hint strong { color: var(--text); font-weight: 600; }
.inline-ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--primary-ink); }
#installBox:empty { display: none; }
#installBox .btn.block { margin-top: 14px; }

.season { background: var(--weak-bg); }
.toggle-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0 4px; font-size: 15px; font-weight: 500; cursor: pointer; }
.toggle-row input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.season .link-btn { margin: 6px 0 0 -10px; }

.notice { margin: 0 0 12px; padding: 12px 16px; border-radius: 14px; background: var(--card); color: var(--text2); font-size: 14px; }

.group { margin-top: 28px; }
.group-title { display: flex; align-items: center; gap: 8px; font-size: 20px; line-height: 29px; font-weight: 700; letter-spacing: -.02em; }
.count { padding: 1px 9px; border-radius: var(--r-chip); background: var(--grey200); color: var(--grey700); font-size: 13px; font-weight: 600; line-height: 1.5; }
.items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.item { padding: 20px 20px 16px; border-radius: var(--r-card); background: var(--card); scroll-margin-top: 76px; }
.item-head { display: flex; gap: 10px; }
.check { position: relative; flex: none; width: 44px; height: 44px; margin: -10px 0 0 -10px; display: grid; place-items: center; cursor: pointer; }
.check input { position: absolute; inset: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.check .box { width: 24px; height: 24px; border: 2px solid var(--grey500); border-radius: 8px; background: #fff; display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; border-radius: 1px; transform: rotate(45deg); }
.check input:focus-visible + .box { outline: 3px solid var(--primary); outline-offset: 2px; }
.check:hover .box { border-color: var(--primary); }
.item-main { flex: 1; min-width: 0; }
.due { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.due svg { width: 16px; height: 16px; }
.due-future { color: var(--primary-ink); }
.due-soon { color: var(--red-ink); }
.due-past, .due-need { color: var(--caption); }
.due-any { color: var(--text2); }
.item-title { font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pending { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: var(--r-chip); background: var(--grey100); color: var(--grey700); font-size: 12px; font-weight: 600; }
.item-sum { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text2); }

.cond { margin-top: 12px; border-top: 1px solid var(--line); }
.cond summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px;
  list-style: none; cursor: pointer; color: var(--text2); font-size: 15px; font-weight: 600;
}
.cond summary::-webkit-details-marker { display: none; }
.cond summary::after { content: ""; width: 8px; height: 8px; margin-right: 6px; border: solid var(--grey500); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.cond[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.cond p { padding-bottom: 6px; font-size: 15px; line-height: 1.55; color: var(--text2); }

.where-label { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--caption); }
/* official-site button = 지원금모야 「조회하러 가기」 weak button */
.go {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; margin-top: 8px; padding: 12px 16px;
  border-radius: var(--r-btn); background: var(--weak-bg);
  color: var(--weak-text); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere;
}
.go:hover { background: var(--blue100); }
.go svg { width: 18px; height: 18px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 10px; font-size: 13px; color: var(--caption); }
.stale { color: var(--red-ink); font-weight: 600; }
.more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-right: -4px; padding: 0 4px; font-size: 14px; font-weight: 600; text-decoration: none; }
.more svg { width: 16px; height: 16px; }
.more:hover { text-decoration: underline; }

.item.is-past { background: var(--grey50); }
.item.is-past .item-title { color: var(--text2); }
.item.is-past .item-sum { color: var(--caption); }
.item.is-done .item-title { color: var(--caption); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.item.is-done .item-sum { color: var(--caption); }

#clearBtn { display: flex; margin: 28px auto 4px; text-decoration: underline; font-weight: 500; font-size: 14px; }
.link-btn.danger { color: var(--red-ink); }
.link-btn.danger:hover { background: var(--red50); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(440px, calc(100% - 32px)); padding: 10px 12px 10px 18px; border-radius: 16px;
  background: var(--grey900); color: #fff; font-size: 15px;
}
.toast-btn { flex: none; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--blue300); font-weight: 700; cursor: pointer; }

/* ---------- privacy page: each language = one white card ---------- */
.doc section { padding: 24px 20px; border-radius: var(--r-card); background: var(--card); scroll-margin-top: 108px; } /* 2-row header 96 + 12 */
.doc section + section { margin-top: 12px; }
.doc h1 { font-size: 26px; line-height: 35px; font-weight: 700; letter-spacing: -.02em; }
.doc h2 { margin-top: 26px; font-size: 17px; font-weight: 700; }
.doc p, .doc li { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--grey800); }
.doc ul { padding-left: 20px; margin: 0; }
.doc .updated { margin-top: 6px; color: var(--caption); font-size: 14px; }

/* ---------- wider screens: 지원금모야 처럼 흰 머리말·바닥글은 화면 가득, 내용은 가운데 단 ---------- */
@media (min-width: 600px) {
  .shell { max-width: 640px; margin: 0 auto; }
  .top, .foot { box-shadow: 0 0 0 100vmax var(--card); clip-path: inset(0 -100vmax); }
  main { padding: 28px var(--gutter) 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
