/* Daywrap 소개(/daywrap/, 앱과 같은 언어)·개인정보 처리방침 전용 스타일.
   색은 앱 src/theme/tokens.ts의 무채색 팔레트를 그대로 쓰고, 색은 4칸 형광펜(categoryPalette)에만 나온다.
   틀(머리·히어로·스토어 버튼·바닥)은 /broke/broke.css·/home.css와 같다. 글꼴은 외부 CDN 없이 시스템 글꼴. */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-muted: #efefee;
  --panel: #f1f1f0;
  --chip: #eaeae9;
  --text: #18181a;
  --muted: #5e5e63;
  --subtle: #68686d;
  --primary: #18181a;
  --on-primary: #ffffff;
  --border: #e5e5e4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  /* 4칸 형광펜: 라이트는 파스텔(dot) 위 먹색 글자 */
  --hl-ember: #ffc3a0;
  --hl-honey: #fbe29a;
  --hl-sage: #bfe0c0;
  --hl-sky: #bfd7f2;
  --hl-ink: #18181a;
  --check: #ffc3a0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --surface: #1e1e20;
    --surface-muted: #252527;
    --panel: #151516;
    --chip: #2a2a2d;
    --text: #f4f4f5;
    --muted: #a6a6ab;
    --subtle: #939399;
    --primary: #f4f4f5;
    --on-primary: #111112;
    --border: #2c2c2f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    /* 다크는 같은 색상의 짙은 바탕(soft)에 밝은 글자(text), 대비 4.6 이상 */
    --hl-ember: #3f210e;
    --hl-honey: #342808;
    --hl-sage: #1b301c;
    --hl-sky: #162b42;
    --hl-ink: #f4f4f5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 760px; }

/* 머리 */
.top { padding: 16px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { font-weight: 700; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.langs { display: flex; gap: 6px; margin: 0; padding: 0; }
.langs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--chip); color: var(--text); text-decoration: none; font-size: 0.88rem; font-weight: 600; white-space: nowrap;
}
.langs a:hover { background: var(--border); }

/* 소개 페이지 언어 고르기: 접힌 칩 하나, 펼치면 두 줄 목록(각 언어 자기 이름) */
.picker { position: relative; }
.picker summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 999px;
  background: var(--chip); color: var(--text); font-size: 0.88rem; font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none;
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary:hover { background: var(--border); }
.picker summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.picker .chev { transition: transform 0.15s ease; }
.picker[open] .chev { transform: rotate(180deg); }
.picker-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(320px, calc(100vw - 32px));
  margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.picker-menu a {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 14px;
  color: var(--text); text-decoration: none; font-size: 0.95rem; line-height: 1.3;
}
.picker-menu a:hover { background: var(--panel); }
.picker-menu a[aria-current] { background: var(--chip); font-weight: 700; }

/* 언어 구역: 스크립트가 있으면 html[data-lang]인 구역만, 없으면 :target 구역(없으면 영어)만 보인다 */
.lang-part { display: none; scroll-margin-top: 240px; }
html:not(.js) .lang-part:target,
html:not(.js):not(:has(.lang-part:target)) #en { display: block; }
@supports not selector(:has(a)) { html:not(.js) #en { display: block; } }
html[data-lang="ko"] #ko,
html[data-lang="en"] #en,
html[data-lang="ja"] #ja,
html[data-lang="zh-Hans"] #zh-Hans,
html[data-lang="zh-Hant"] #zh-Hant,
html[data-lang="sv"] #sv,
html[data-lang="da"] #da,
html[data-lang="nb"] #nb,
html[data-lang="nl"] #nl,
html[data-lang="de"] #de,
html[data-lang="fr"] #fr,
html[data-lang="es"] #es,
html[data-lang="pt"] #pt { display: block; }
/* 좁은 4칸 안의 긴 낱말(독일어 등)만 하이픈으로 끊고, 중국어·일본어는 글자 사이에서 줄을 바꾼다 */
.box li { hyphens: auto; -webkit-hyphens: auto; }
:lang(ja), :lang(zh) { word-break: normal; line-break: strict; }
:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }

/* 첫 화면 */
.hero { padding: 32px 0 40px; }
@media (min-width: 720px) { .hero { padding: 64px 0 56px; } }
.app-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow); }
.app-name { margin: 20px 0 0; font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; }
.hero h1 { margin: 4px 0 16px; font-size: clamp(2rem, 7.4vw, 3.25rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; }
.lead { margin: 0 0 24px; max-width: 32em; font-size: 1.08rem; color: var(--muted); }
.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.store-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font-weight: 700; text-decoration: none;
}
/* 꺼진 버튼은 흐리게 하지 않고 surfaceMuted 바탕에 보조 글자 */
.store-button.pending { background: var(--surface-muted); color: var(--muted); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { background: var(--chip); border-radius: 999px; padding: 4px 14px; font-size: 0.88rem; font-weight: 600; color: var(--text); }

/* 섹션 */
.block { padding: 32px 0; }
.block h2 { margin: 0 0 6px; font-size: 1.4rem; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.block .sub { margin: 0 0 20px; color: var(--muted); }

/* 4칸 보기: panel 위에 흰 카드 넷(앱 오늘 화면과 같은 구성) */
.quad { background: var(--panel); border-radius: 28px; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .quad { padding: 16px; gap: 12px; } }
.box { background: var(--surface); border-radius: 20px; padding: 14px 14px 16px; min-height: 148px; }
.box-title { display: inline; padding: 1px 6px; margin-left: -2px; border-radius: 4px; font-weight: 700; font-size: 0.95rem; color: var(--hl-ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.box.ember .box-title { background: var(--hl-ember); }
.box.honey .box-title { background: var(--hl-honey); }
.box.sage .box-title { background: var(--hl-sage); }
.box.sky .box-title { background: var(--hl-sky); }
.box ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.box li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }
.box li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--subtle); }
.box li.done { color: var(--subtle); text-decoration: line-through; }
.box li.done::before { background: var(--check); border-color: var(--check); }
.quad-note { margin: 12px 4px 0; font-size: 0.88rem; color: var(--muted); }

/* 기능 카드: panel 위에 흰 카드, 테두리 없음 */
.features { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; background: var(--panel); border-radius: 28px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; padding: 16px; gap: 12px; } }
.features li { background: var(--surface); border-radius: 20px; padding: 18px 20px; }
.features strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.features span { display: block; color: var(--muted); font-size: 0.95rem; }

/* 다꾸 달력 그림 */
.shot { margin: 0; background: var(--panel); border-radius: 28px; overflow: hidden; }
.shot img { width: 100%; }
.split { display: grid; gap: 20px; align-items: center; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; gap: 40px; } }
.split ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.split li + li { margin-top: 6px; }

/* 지원 */
.support { background: var(--surface); border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .support { padding: 28px; } }
.support h2 { margin-top: 0; }
.support p { margin: 0 0 16px; color: var(--muted); }
.support .mail { font-weight: 700; color: var(--text); }
.support .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.support .policy-note { margin: 12px 0 0; font-size: 0.88rem; }
.button-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 999px;
  background: var(--chip); color: var(--text); font-weight: 700; text-decoration: none;
}

/* 바닥 */
footer { padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
footer a { color: var(--muted); }

/* 개인정보 처리방침(privacy.html) */
.doc { padding-bottom: 64px; }
.doc .head { display: flex; align-items: center; gap: 14px; margin: 16px 0 8px; }
.doc .head img { width: 48px; height: 48px; border-radius: 12px; box-shadow: var(--shadow); }
.doc h1 { margin: 0; font-size: clamp(1.5rem, 5.4vw, 1.9rem); line-height: 1.3; letter-spacing: -0.02em; }
.doc h1 + p { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }
.doc h2 { margin: 36px 0 10px; font-size: 1.15rem; line-height: 1.4; }
.doc p, .doc li { font-size: 1rem; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 56px 0 24px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.doc table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.92rem; line-height: 1.55; }
.doc th, .doc td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--panel); font-weight: 700; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.doc .table-scroll.two table { min-width: 0; }
