/* 사이트 공통 디자인 — 모든 페이지가 이 파일 하나를 같이 씁니다.
   여기서 바꾸면 23개 도구 + 허브 + 소개·개인정보·문의 페이지에 한 번에 반영됩니다.
   도구마다 다른 고유 색·화면은 각 도구 페이지 안에 그대로 있습니다. */

:root {
  /* 공통 글꼴 */
  --site-font: "Geist", "Noto Sans KR", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  /* 바닥글·다른 도구 카드 */
  --site-line: var(--line, #e6e6ea);
  --site-ink: var(--ink, #0a0a0b);
  --site-muted: var(--ink2, var(--muted, #5b5b66));
  --site-faint: var(--ink3, var(--faint, #8a8a95));
  --site-card: var(--card, var(--surface, #fff));
  --site-radius: 16px;
  --site-accent: #2f6bff;
}

/* ── 바닥글 ── */
#foot .site-foot { display: flex; flex-direction: column; gap: 10px; width: 100%; font-size: 14px; color: var(--site-muted); }
#foot .sf-links, #foot .sf-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; }
#foot .sf-links a, #foot .sf-langs a { color: inherit; text-decoration: none; }
#foot .sf-links a:hover, #foot .sf-langs a:hover { color: var(--site-ink); text-decoration: underline; }
#foot .sf-langs a[aria-current] { color: var(--site-ink); font-weight: 600; }
#foot .sf-copy { font-size: 13px; color: var(--site-faint); }

/* ── 다른 도구 카드 ── */
#toolL .site-tool { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px; border-radius: var(--site-radius); border: 1px solid var(--site-line); background: var(--site-card);
  text-decoration: none; color: var(--site-ink); min-height: 76px; transition: border-color .16s; }
#toolL .site-tool i { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: -.2px; overflow: hidden; white-space: nowrap; }
#toolL .site-tool b { font-size: 14px; font-weight: 600; line-height: 1.3; }
#toolL .site-tool span { font-size: 13px; color: var(--site-muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { #toolL .site-tool:hover { border-color: var(--site-faint); } }

/* ── 소개·개인정보·문의 페이지 ── */
body.site-doc { margin: 0; font: 16px/1.75 var(--site-font); color: #111113; background: #fbfbfa; word-break: keep-all; overflow-wrap: break-word; }
.site-doc .doc-top { border-bottom: 1px solid #e7e7ea; background: #fff; }
.site-doc .doc-top a { display: inline-flex; align-items: center; gap: 9px; max-width: 720px; margin: 0 auto; padding: 14px 20px;
  font-weight: 700; font-size: 17px; color: #111113; text-decoration: none; }
.site-doc .doc-top .mk { width: 28px; height: 28px; border-radius: 8px; background: #111113; color: #fff; display: grid; place-items: center; font-size: 13px; }
.site-doc main { max-width: 720px; margin: 0 auto; padding: 28px 20px 40px; }
.site-doc h1 { font-size: 26px; line-height: 1.3; margin: 0 0 16px; }
.site-doc h2 { font-size: 18px; margin: 28px 0 6px; }
.site-doc section + section { margin-top: 36px; padding-top: 28px; border-top: 1px solid #e7e7ea; }
.site-doc a { color: var(--site-accent); }
.site-doc .mail { font-weight: 700; font-size: 18px; }
.site-doc footer#foot { max-width: 720px; margin: 0 auto; padding: 20px 20px 32px; border-top: 1px solid #e7e7ea; }
@media (prefers-color-scheme: dark) {
  body.site-doc { background: #0c0c0e; color: #f2f2f4; }
  .site-doc .doc-top { background: #151518; border-color: #26262c; }
  .site-doc .doc-top a { color: #f2f2f4; }
  .site-doc .doc-top .mk { background: #f2f2f4; color: #0c0c0e; }
  .site-doc section + section, .site-doc footer#foot { border-color: #26262c; }
  .site-doc a { color: #7ea2ff; }
}

/* ── 화면 모드 버튼 (바닥글) ── */
#foot .sf-theme { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#foot .sf-theme span { margin-right: 6px; }
#foot .sf-theme button { font: inherit; font-size: 13px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--site-line);
  background: var(--site-card); color: var(--site-muted); cursor: pointer; }
#foot .sf-theme button[aria-pressed="true"] { background: var(--site-ink); border-color: var(--site-ink); color: var(--bg, #fff); font-weight: 600; }

/* 광고 칸과 누르는 것 사이 거리 (11/24 총계획 1-4-4): 잘못 누름을 막으려고 본문 광고 위에 24px,
   휴대폰 아래 띠 광고가 있을 때는 마지막 단추가 띠 뒤에 숨지 않게 바닥 여백 */
.ad.inl{margin-top:24px!important}
@media (max-width:760px){body{padding-bottom:max(env(safe-area-inset-bottom),72px)}}
/* 휴대폰 아래 띠 광고: 첫 화면에서는 숨기고, 화면을 내리면 올라옴 (첫 화면 단추를 덮지 않게) */
@media (max-width:760px){
  .anchor{transform:translateY(130%);transition:transform .25s cubic-bezier(.23,1,.32,1)}
  .anchor.on{transform:none}
}
@media (prefers-reduced-motion:reduce){.anchor{transition:none}}

/* ══ 디자인 기준 (11/25 적용) ══════════════════════════════════════
   뼈대는 하나, 언어마다 값만 바꿈 (B안). 근거: 「언어별 시안」 아티팩트의 나라별 조사.
   · 브랜드 색은 모든 언어에 하나(--site-accent). 도구마다 고유 색(--brand)은 그대로 둠.
   · 모서리: build.py 가 도구 페이지의 border-radius 를 calc(값 × --rk) 로 바꿔 둠 → 여기서 --rk 만 바꾸면 됨.
   · 밝은 화면에서만 언어별 바탕·글자색을 바꿈. 어두운 화면은 도구 페이지 값을 그대로 씀. */
:root { --rk: 1; --site-accent: #0B9B63; }

/* 회색 작은 글자 대비 4.5:1 이상 (밝은 화면) */
html:not([data-theme="dark"]) { --ink3: #6B6B75; --faint: #6B6B75; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --ink3: #8E8E98; --faint: #8E8E98; } }

/* 언어별 모서리 (출처: en 애플 · de 잘란도·DB · fr 독토립 · ko 토스·당근 · ja 메루카리 · zh 앤트·TDesign · es 메르카도리브레 · pt 누뱅크 · it 사티스페이) */
html:lang(en) { --rk: 1; }
html:lang(de) { --rk: .25; }
html:lang(fr) { --rk: .7; }
html:lang(ko) { --rk: 1.2; }
html:lang(ja) { --rk: .75; }
html:lang(zh) { --rk: .5; }
html:lang(es) { --rk: 1; }
html:lang(pt) { --rk: 1.2; }
html:lang(it) { --rk: .6; }

/* 언어별 바탕·면·선·글자 (밝은 화면만) */
@media (prefers-color-scheme: light) {
  html:lang(en):not([data-theme="dark"]) { --surface:#F5F5F7; --line:#D9D9DE; --ink:#1D1D1F; --ink2:#5E5E64; }
  html:lang(de):not([data-theme="dark"]) { --surface:#F2F2F0; --line:#C8C8C4; --ink:#1A1A1A; --ink2:#55554F; }
  html:lang(fr):not([data-theme="dark"]) { --bg:#FBFBF9; --surface:#F0EFEA; --line:#D6D5CF; --ink:#161616; --ink2:#55554F; }
  html:lang(ko):not([data-theme="dark"]) { --bg:#F2F4F6; --card:#FFFFFF; --surface:#E8EBEE; --line:#E1E4E8; --ink:#191F28; --ink2:#4E5968; }
  html:lang(ja):not([data-theme="dark"]) { --surface:#F2F2F2; --line:#D8D8DC; --ink:#1A1A1C; --ink2:#555559; }
  html:lang(zh):not([data-theme="dark"]) { --bg:#F5F6F8; --card:#FFFFFF; --surface:#EBEDF0; --line:#DEE0E3; --ink:#1F2329; --ink2:#5A6068; }
  html:lang(es):not([data-theme="dark"]) { --bg:#F4F4F4; --card:#FFFFFF; --surface:#EAEAEA; --line:#DEDEDE; --ink:#1A1A1A; --ink2:#575757; }
  html:lang(pt):not([data-theme="dark"]) { --surface:#F3F3F6; --line:#DCDCE2; --ink:#111114; --ink2:#55555F; }
  html:lang(it):not([data-theme="dark"]) { --surface:#F3F3F3; --line:#DADADA; --ink:#141414; --ink2:#545454; }
}
html:lang(en)[data-theme="light"] { --surface:#F5F5F7; --line:#D9D9DE; --ink:#1D1D1F; --ink2:#5E5E64; }
html:lang(de)[data-theme="light"] { --surface:#F2F2F0; --line:#C8C8C4; --ink:#1A1A1A; --ink2:#55554F; }
html:lang(fr)[data-theme="light"] { --bg:#FBFBF9; --surface:#F0EFEA; --line:#D6D5CF; --ink:#161616; --ink2:#55554F; }
html:lang(ko)[data-theme="light"] { --bg:#F2F4F6; --card:#FFFFFF; --surface:#E8EBEE; --line:#E1E4E8; --ink:#191F28; --ink2:#4E5968; }
html:lang(ja)[data-theme="light"] { --surface:#F2F2F2; --line:#D8D8DC; --ink:#1A1A1C; --ink2:#555559; }
html:lang(zh)[data-theme="light"] { --bg:#F5F6F8; --card:#FFFFFF; --surface:#EBEDF0; --line:#DEE0E3; --ink:#1F2329; --ink2:#5A6068; }
html:lang(es)[data-theme="light"] { --bg:#F4F4F4; --card:#FFFFFF; --surface:#EAEAEA; --line:#DEDEDE; --ink:#1A1A1A; --ink2:#575757; }
html:lang(pt)[data-theme="light"] { --surface:#F3F3F6; --line:#DCDCE2; --ink:#111114; --ink2:#55555F; }
html:lang(it)[data-theme="light"] { --surface:#F3F3F3; --line:#DADADA; --ink:#141414; --ink2:#545454; }

/* 한국어는 Pretendard (build.py 가 한국어 페이지에만 글꼴 링크를 넣음) */
html:lang(ko) { --f: "Pretendard Variable", Pretendard, "Geist", "Noto Sans KR", system-ui, sans-serif; }

/* 읽는 글: 일본어는 줄 간격을 넓게, 프랑스어·독일어는 본문을 조금 크게 */
html:lang(ja) :is(p, li, dd, details) { line-height: 1.75; }
html:lang(fr) :is(main, .main, .wrap) :is(p, li, details), html:lang(de) :is(main, .main, .wrap) :is(p, li, details) { font-size: max(1em, 16.5px); }

/* 반투명 유리 효과는 위 메뉴에만, 투명도 줄이기 설정이면 불투명 */
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* 누르는 느낌: 단추를 누르면 살짝 들어감 (큰 판은 제외, 움직임 줄이기 설정이면 끔) */
@media (prefers-reduced-motion: no-preference) {
  button:not(:disabled):not(.pad):not(.stage):active, a.site-tool:active, a.t:active { scale: .97; }
}

/* 광고 승인 전(설정에 adsense_pub 가 비어 있음): 빈 광고 자리를 보이지 않음. 승인 뒤 번호를 넣으면 다시 나옴 */
html.noads :is(.rail, #adI, #anchor) { display: none !important; }
html.noads .first { grid-template-columns: minmax(0, 1080px) !important; justify-content: center; }

/* ══ 언어별 성격: 도구 페이지 카드 (11/26, 4-1-8) ══ 밝은 화면만. 허브는 index 쪽에 같은 값 */
html:not([data-theme="dark"]):lang(en) main .card,html:not([data-theme="dark"]):lang(es) main .card,html:not([data-theme="dark"]):lang(pt) main .card{border-color:transparent;box-shadow:0 1px 3px rgba(0,0,0,.06),0 0 0 .5px rgba(0,0,0,.06)}
html:not([data-theme="dark"]):lang(ko) main .card{border-color:transparent}
html:not([data-theme="dark"]):lang(de) main .card{border-width:1.5px;border-color:#8E908B}
html:not([data-theme="dark"]):lang(ja) main .card{border-color:#D4D6DA}
html:not([data-theme="dark"]):lang(fr) main .card{border-color:#CFD3DA}
html:not([data-theme="dark"]):lang(it) main .card{border-color:#C9C9C9}
html:lang(ja) main h1,html:lang(zh) main h1{letter-spacing:0;font-weight:700}
html:lang(de) main h1{letter-spacing:-.01em}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) main .card{box-shadow:none}}

/* 휴대폰에서 입력칸을 누르면 화면이 확대되는 것 막기 (iOS 는 16px 미만이면 확대) — 11/26 4-2-5 */
@media (max-width:760px) and (pointer:coarse){main input:not([type=range]):not([type=checkbox]):not([type=radio]),main select,main textarea{font-size:16px!important}}

/* site-tool-wrap: 긴 낱말(독일어 등)이 좁은 화면에서 넘치지 않게 */
.site-tool{min-width:0}.site-tool b,.site-tool span{min-width:0;overflow-wrap:anywhere;hyphens:auto}

/* 한 손 숫자 키패드 (site.js) */
.npad,.npad *{-webkit-tap-highlight-color:transparent}
.npad{position:fixed;left:0;right:0;bottom:0;z-index:9990;max-width:520px;margin:0 auto;background:var(--card,#fff);color:var(--ink,#111);border-radius:20px 20px 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.18);padding:10px 10px calc(10px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .22s cubic-bezier(.32,.72,0,1);touch-action:manipulation;user-select:none;-webkit-user-select:none}
.npad.on{transform:none}
.npad-top{display:flex;align-items:center;gap:10px;padding:2px 4px 8px}
.npad-l{flex:1;min-width:0}.npad-lab{display:block;font-size:12px;color:var(--ink3,#667);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.npad-v{display:block;font-size:28px;font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.npad-v.empty{color:var(--ink3,#99a)}
.npad-ok{min-height:44px;padding:0 18px;border-radius:12px;border:0;background:var(--brand,#2563eb);color:var(--on-brand,#fff);font-size:16px;font-weight:800}
.npad-q{display:flex;gap:6px;overflow-x:auto;padding:0 2px 8px;scrollbar-width:none}.npad-q::-webkit-scrollbar{display:none}
.npad-q button{flex:none;min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line,#dde);background:var(--card,#fff);color:var(--ink,#111);font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.npad-q button.add{color:var(--brand,#2563eb);border-color:color-mix(in srgb,var(--brand,#2563eb) 35%,var(--line,#dde))}
.npad-g{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.npad-g button{min-height:52px;border-radius:12px;border:0;background:var(--surface,#f1f3f6);color:var(--ink,#111);font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.npad-g button:active{transform:scale(.96);background:var(--line,#dde)}
.npad-g .f{font-size:16px;color:var(--ink2,#334)}.npad-g .m,.npad-g .p{font-size:26px;color:var(--brand,#2563eb);background:color-mix(in srgb,var(--brand,#2563eb) 10%,var(--card,#fff))}
.npad-g .next{font-size:14px}.npad-g .kb,.npad-g .clr{grid-column:span 2;min-height:40px;font-size:14px;background:none;border:1px solid var(--line,#dde)}
.npad-g button:disabled{opacity:.35}
html.npad-open body{padding-bottom:340px}
@media (prefers-reduced-motion:reduce){.npad{transition:none}}
