/* 바오마당 포털 — 글씨 크기 (설정 › 글씨 크기)
   <html class="font-lg"> 크게(약 115%) · <html class="font-xl"> 아주 크게(약 130%).
   style.css · shell.css 뒤에 불러와서 덮어쓴다. rem 으로 된 글씨는 뿌리 크기를 따라 커지고,
   px 로 정한 글씨(본문 15px 등)와 누르는 칸 크기는 여기서 따로 키운다.
   가족 앱(family/static/a11y.css)의 공통 탭 규칙과 모양을 맞출 것. */

html.font-lg { font-size: 115%; }
html.font-xl { font-size: 130%; }
/* 본문 15px → 뿌리 크기 기준(.9375rem)으로: 크게 17.25px · 아주 크게 19.5px */
html.font-lg body { font-size: .9375rem; line-height: 1.7; }
html.font-xl body { font-size: .9375rem; line-height: 1.75; }
html:is(.font-lg, .font-xl) body { overflow-wrap: break-word; }

/* 입력 칸: 16px 이상이어야 아이폰이 저절로 확대하지 않는다 */
html:is(.font-lg, .font-xl) :is(input, select, textarea) { font-size: max(16px, 1em); }
html.font-lg :is(input:not([type=checkbox]):not([type=radio]):not([type=color]), select) { min-height: 48px; }
html.font-xl :is(input:not([type=checkbox]):not([type=radio]):not([type=color]), select) { min-height: 54px; }
html.font-lg input[type=checkbox] { width: 22px; height: 22px; }
html.font-xl input[type=checkbox] { width: 26px; height: 26px; }

/* 버튼 · 누르는 칸 */
html.font-lg :is(button, .button) { min-height: 48px; padding: 10px 18px; }
html.font-xl :is(button, .button) { min-height: 54px; padding: 12px 20px; }
html:is(.font-lg, .font-xl) button.small { min-height: 42px; padding: 6px 12px; }
html:is(.font-lg, .font-xl) button.linkish { min-height: 0; padding: 0; }
html.font-lg .menu-list :is(a, button) { min-height: 64px; padding-block: 10px; }
html.font-xl .menu-list :is(a, button) { min-height: 70px; padding-block: 12px; }
html:is(.font-lg, .font-xl) .menu-list .t small { line-height: 1.45; }
html:is(.font-lg, .font-xl) .home-events a { min-height: 66px; }

/* 머리글 */
html:is(.font-lg, .font-xl) .bar { gap: 8px 10px; }
html:is(.font-lg, .font-xl) .brand { min-width: 0; }
html:is(.font-lg, .font-xl) .brand span { overflow: hidden; text-overflow: ellipsis; }
html:is(.font-lg, .font-xl) .me summary { padding: 9px 14px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:is(.font-lg, .font-xl) .me .menu { min-width: 220px; max-width: calc(100vw - 24px); }
html:is(.font-lg, .font-xl) .me .menu :is(a, button) { min-height: 48px; padding: 10px 12px; display: flex; align-items: center; }
html:is(.font-lg, .font-xl) .tools-btn { padding: 8px 14px; }
html:is(.font-lg, .font-xl) .tools-btn svg { width: 20px; height: 20px; }

/* 공통 탭 (PC: 위 줄) */
html:is(.font-lg, .font-xl) .shell-tabs a { padding: 14px 18px 12px; }
html:is(.font-lg, .font-xl) .shell-tabs svg { width: 24px; height: 24px; }

/* 알림 · 칩 · 작은 글씨가 너무 작아지지 않게 */
html:is(.font-lg, .font-xl) .notice { padding: 12px 16px; }
html:is(.font-lg, .font-xl) .chip { font-size: .85rem; }
html:is(.font-lg, .font-xl) .tool { width: 104px; }
html:is(.font-lg, .font-xl) .tool-status { max-width: 100px; font-size: .74rem; }
html:is(.font-lg, .font-xl) .tool-name { font-size: .85rem; }

/* 휴대폰: 360px 에서도 옆으로 넘치지 않게 */
@media (max-width: 699px) {
  html:is(.font-lg, .font-xl) .page { padding-inline: 12px; }
  html:is(.font-lg, .font-xl) .card { padding: 16px 14px; }
  html:is(.font-lg, .font-xl) .tools-btn { padding: 8px 10px; }
  html:is(.font-lg, .font-xl) .shell-tabs a { min-width: 0; padding: 6px 1px 4px; gap: 1px; line-height: 1.2; letter-spacing: -.03em; }
  html:is(.font-lg, .font-xl) .shell-tabs a > span:not(.dot-count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.font-lg .shell-tabs a { font-size: 13.5px; }
  html.font-xl .shell-tabs a { font-size: 14.5px; }
  html:is(.font-lg, .font-xl) .shell-tabs svg { width: 25px; height: 25px; }
  html:is(.font-lg, .font-xl) body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  html:is(.font-lg, .font-xl) .tiles { gap: 8px; }
  html.font-xl .tiles { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  html.font-xl .shell-tabs a { font-size: 13.5px; }
  html:is(.font-lg, .font-xl) .brand img { width: 28px; height: 28px; }
}

/* ---- 설정 › 글씨 크기 */
.font-card [hidden] { display: none !important; }
.font-card .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.font-form { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.font-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.font-choice { position: relative; display: block; font-weight: 600; }
.font-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.font-choice .fc-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 92px; padding: 8px 4px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--panel); text-align: center; line-height: 1.25; }
.font-choice .fc-box b { font-size: min(1rem, 17px); white-space: nowrap; }
.fc-a { font-weight: 800; line-height: 1; color: var(--ink); }
.fc-base { font-size: 20px; } .fc-lg { font-size: 27px; } .fc-xl { font-size: 34px; }
.font-choice input:checked + .fc-box { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.font-choice input:checked + .fc-box .fc-a { color: var(--accent); }
.font-choice input:focus-visible + .fc-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.font-preview { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel2); }
.fp-label { margin: 0 0 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.fp-post { display: flex; flex-direction: column; gap: 8px; }
.fp-head { display: flex; align-items: center; gap: 10px; }
.fp-head > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.fp-head small { color: var(--muted); }
.fp-av { width: 2.3em; height: 2.3em; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: 0 0 auto; }
.fp-text { margin: 0; }
.fp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-btn { display: inline-flex; align-items: center; min-height: 2.6em; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 600; }
.font-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.font-status { margin: 0; }
.font-status:empty { display: none; }
@media (max-width: 400px) {
  .font-choice .fc-box b { font-size: min(.92rem, 16px); letter-spacing: -.02em; }
  .fc-lg { font-size: 25px; } .fc-xl { font-size: 30px; }
}
