/* KKOOK (꼬옥) — 2026-10-15 밤 회장님 결정: 앱 = KKOOK 빨강 「OO」, 블로그 koreastarterkit.com 은 파랑 체크(별개 브랜드).
 * 「같은 집안, 다른 색」: 구조(카드 둥글기 20 · 버튼 56/48 둥글기 14 · 입력 56 · 글자 t1–t7 · 여백 20)는 지원금모야 preset_toss 그대로
 * (앱형\site\config\preset_toss.json · 규격_토스뱅크.md). 바탕 흰색, 글자 먹색, 카드는 얇은 회색 선.
 * 색의 역할: 빨강 #CD2E3A = 로고·머리말 글자·주 버튼·선택(활성) 상태에만 · 초록 #16A34A = 체크 완료·진행 · 주황 = 곧 할 일·경고.
 * 흰 글자/빨강 5.2:1 · 빨간 글자 #A8232E 7.1:1 · 초록 글자 #15803D 5.0:1 · 주황 글자 #C2410C 5.2:1. 무늬·띠 없음.
 * 옛 버전: ..\_old_blue\ (지원금모야 파랑) · ..\_old_hanji\ (전통색). 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;
  --red: #cd2e3a; --red-dark: #a8232e; --red-weak: #fdecee;
  --green: #16a34a; --green-ink: #15803d;
  --orange: #f97316; --orange-ink: #c2410c; --orange-weak: #fff4e5; --orange-line: #fed7aa;
  --bg: #fff; --card: #fff; --text: #1a1a1a; --text2: var(--grey700); --caption: var(--grey600); --line: var(--grey200);
  --primary: var(--red); --primary-hover: var(--red-dark);
  --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(--text); }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
main:focus, h1:focus { outline: none; }
h1:focus-visible { outline: 3px solid var(--red); }
.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 (wordmark) · white 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); box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; text-decoration: none; }
.brand img { display: block; width: auto; height: 22px; }
/* 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; width: 100%; padding: 20px var(--gutter) 8px; }
.pad { padding: 20px; }

.foot {
  margin-top: 40px; padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); 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(--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(--grey100); }

.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 = 지원금모야 grey button (빨강은 주 버튼에만) · 켜짐 = 활성 빨강 */
.btn.ghost { background: var(--grey100); color: var(--grey800); }
.btn.ghost:hover { background: var(--grey200); }
.btn.ghost.is-on { background: var(--red-weak); color: var(--red-dark); box-shadow: inset 0 0 0 1.5px var(--red); }
.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(--text);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.link-btn svg { width: 18px; height: 18px; color: var(--text2); }
.link-btn:hover { background: var(--grey100); }
.error { margin-top: 14px; color: var(--red-dark); font-size: 15px; font-weight: 500; }
.error:empty { display: none; }
.card { margin-bottom: 12px; padding: 20px; border: 1px solid var(--line); 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; }
.choices { display: grid; gap: 10px; margin-top: 4px; }
/* single choice = 지원금모야 선택지: row radius 20 · selected = 연한 빨강 + 빨간 테두리 */
.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 1px var(--line);
  text-align: left; cursor: pointer; transition: box-shadow .15s, background-color .15s;
}
.choice:hover { background: var(--grey50); }
.choice.is-on { background: var(--red-weak); box-shadow: inset 0 0 0 2px var(--red); }
.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(--red); }
.choice.is-on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ---------- 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(--red); }
.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(--red); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--red-dark); }

/* ---------- 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 = done → green */
.progress { font-size: 15px; font-weight: 700; color: var(--green-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(--green); transition: width .3s; }

/* due today / tomorrow → orange (warning, not error) */
.soon { background: var(--orange-weak); border-color: var(--orange-line); }
.soon h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--orange-ink); }
.soon h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.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: #fff; color: var(--orange-ink); font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--orange-line); }

.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(--text); }
#installBox:empty { display: none; }
#installBox .btn.block { margin-top: 14px; }

.season { background: var(--grey50); }
.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(--red); 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(--grey50); 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(--grey100); 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: 1px solid var(--line); 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; }
/* checked = done → green */
.check input:checked + .box { background: var(--green); border-color: var(--green); }
.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(--red); outline-offset: 2px; }
.check:hover .box { border-color: var(--grey700); }
.check:hover input:checked + .box { border-color: var(--green); }
.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(--text2); }
.due-soon { color: var(--orange-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 = 지원금모야 grey 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(--grey100);
  color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere;
}
.go:hover { background: var(--grey200); }
.go svg { width: 18px; height: 18px; color: var(--text2); }
.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(--orange-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; color: var(--text); }
.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-dark); }
.link-btn.danger:hover { background: var(--red-weak); }

/* ---------- 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: #191f28; color: #fff; font-size: 15px;
}
.toast-btn { flex: none; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #ff8a94; font-weight: 700; cursor: pointer; }

/* ---------- privacy page: each language = one card ---------- */
.doc section { padding: 24px 20px; border: 1px solid var(--line); 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: header·footer full width, content in a centred 640px column ---------- */
@media (min-width: 600px) {
  .top, .foot { padding-left: max(var(--gutter), calc((100% - 600px) / 2)); padding-right: max(var(--gutter), calc((100% - 600px) / 2)); }
  main { max-width: 640px; margin: 0 auto; padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
