:root {
  --bg: #f7f7f5; --panel: #ffffff; --text: #1f2328; --muted: #6b7280; --line: #e5e7eb;
  --accent: #2563eb; --hl-bg: #fff7e6; --hl-text: #8a4b00; --holiday: #c92a2a; --bar: #4dabf7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141517; --panel: #1c1d20; --text: #e6e6e6; --muted: #9aa0a6; --line: #2e3035;
    --accent: #6ea8fe; --hl-bg: #2b2414; --hl-text: #ffd8a8; --holiday: #ff8787; --bar: #339af0;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); line-height: 1.6;
       font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
a { color: var(--accent); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
       padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 14px; }
.top a { text-decoration: none; }
.top-compare { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.hero { padding: 8px 0 4px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; }
h1 { font-size: 26px; margin: 8px 0 2px; line-height: 1.3; }
h2 { font-size: 18px; margin: 0 0 12px; }
.desc { font-size: 15.5px; margin: 12px 0 0; }
.muted { color: var(--muted); font-size: 13px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 16px; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 14.5px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-word; }
.hl { background: var(--hl-bg); color: var(--hl-text); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; margin: 0 0 12px; }
.meals { display: grid; gap: 12px; }
.meal { border-top: 1px solid var(--line); padding-top: 10px; }
.meal:first-child { border-top: none; padding-top: 0; }
.meal-date { font-weight: 700; font-size: 15px; }
.meal-kind { font-size: 13px; color: var(--muted); margin-top: 4px; }
.meal-dishes { font-size: 15px; }
.events { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.events li:last-child { border-bottom: none; }
.events .holiday { color: var(--holiday); font-weight: 600; }
.ev-date { display: inline-block; min-width: 108px; color: var(--muted); font-weight: 400; }
.events .holiday .ev-date { color: var(--holiday); }
.cta { margin-top: 16px; border-radius: 14px; padding: 18px; background: linear-gradient(135deg, #2b8a3e, #1971c2); color: #fff; }
.cta-title { font-size: 17px; font-weight: 700; }
.cta-body { font-size: 14px; margin: 6px 0 12px; opacity: .95; }
.cta-btn { display: inline-block; background: #fff; color: #1971c2; font-weight: 700; text-decoration: none;
           padding: 10px 16px; border-radius: 10px; font-size: 15px; }
.trend { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 16px; padding-top: 20px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar-fill { width: 100%; max-width: 44px; background: var(--bar); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar-v { font-size: 11.5px; color: var(--muted); order: -1; margin-bottom: 2px; }
.bar-y { font-size: 12px; color: var(--muted); margin-top: 4px; }
.near-group { margin-top: 10px; }
.near-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.near-group ul { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.minimap { height: 220px; border-radius: 10px; margin-top: 14px; background: var(--bg); }
.links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 14.5px; }
footer { margin-top: 24px; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 520px) {
  dl { grid-template-columns: 96px 1fr; }
  h1 { font-size: 23px; }
}

/* 알레르기 표시 */
.allergy { margin: 0 0 12px; font-size: 14px; }
.allergy summary { cursor: pointer; color: var(--accent); }
.allergy-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.achip { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
         background: var(--bg); color: var(--text); cursor: pointer; }
.achip[aria-pressed="true"] { background: var(--holiday); border-color: var(--holiday); color: #fff; }
.dish.bad { color: var(--holiday); font-weight: 700; }
.dish.bad::before { content: "⚠ "; }

/* 캘린더 구독 */
.cal { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.cal-title { font-weight: 700; font-size: 15px; }
.cal-body { font-size: 13.5px; color: var(--muted); margin: 2px 0 10px; }
.cal-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--accent);
       color: var(--accent); text-decoration: none; background: var(--panel); }
.btn.subtle { border-color: var(--line); color: var(--muted); }

/* 하교 시간표 */
.tt-wrap { overflow-x: auto; }
table.tt { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 420px; }
table.tt th, table.tt td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: center; }
table.tt thead th { font-weight: 600; }
table.tt thead th .muted, table.tt td .muted { display: block; font-size: 11.5px; font-weight: 400; }
table.tt th[scope="row"] { text-align: left; white-space: nowrap; color: var(--muted); font-weight: 400; }
.inline-cta { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 14.5px; }

/* 방학 한눈에 */
table.vac { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 420px; }
table.vac th, table.vac td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; }
table.vac th { color: var(--muted); font-weight: 500; }
.gus { line-height: 2; font-size: 15px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.kind { background: var(--bg); border-radius: 8px; padding: 3px 9px; font-size: 13px; color: var(--muted); }
.kind b { color: var(--text); }

/* 반별 시간표 · 학년별 표 */
.cls-pick { display: flex; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.cls-pick select { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
table.tt.cls td { font-size: 13px; }
.sub-h { font-size: 15px; margin: 18px 0 8px; }
table.grades td.up { color: #2b8a3e; }
table.grades td.down { color: var(--holiday); }

/* =========================================================
   디자인 갱신 (2026-10-13) — 지도 페이지와 같은 색·글꼴·카드
   ========================================================= */
:root {
  --bg: #f4f6fa; --panel: #ffffff; --text: #191f28; --muted: #6b7684; --line: #e5e8eb; --hover: #f2f4f6;
  --accent: #3182f6; --accent-soft: #e8f3ff; --accent-ink: #1b64da;
  --brand: linear-gradient(135deg, #12b886 0%, #3182f6 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06); --shadow: 0 8px 28px rgba(15, 23, 42, .08);
  --hl-bg: #fff4e6; --hl-text: #b35000; --holiday: #e03131; --bar: #3182f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --panel: #17191d; --text: #e9ecef; --muted: #8b95a1; --line: #2a2e34; --hover: #20242a;
    --accent: #4f9cff; --accent-soft: #172a45; --accent-ink: #8bbcff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 10px 30px rgba(0,0,0,.45);
    --hl-bg: #2b2014; --hl-text: #ffc078; --holiday: #ff6b6b; --bar: #4f9cff;
  }
}
body { font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
       -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; line-height: 1.65; }
.top { padding: 10px 16px; background: color-mix(in srgb, var(--panel) 88%, transparent);
       backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); gap: 12px; }
.top-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; letter-spacing: -0.03em; font-size: 15px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center;
        box-shadow: 0 4px 12px rgba(49,130,246,.28); flex: none; }
.logo svg { width: 18px; height: 18px; }
.top-actions { display: flex; gap: 6px; }
.top-compare, .top-link { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px;
                          padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--panel); }
.top-compare { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
main { max-width: 780px; padding: 20px 16px 48px; }
.hero { padding: 18px 20px 20px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--brand); }
.badge { padding: 3px 11px; font-weight: 700; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; margin: 10px 0 2px; line-height: 1.25; }
h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }
.desc { font-size: 15.5px; margin: 12px 0 0; padding: 12px 14px; background: var(--bg); border-radius: 12px; }
section { border-radius: 18px; padding: 18px; margin-top: 14px; box-shadow: var(--shadow-sm); }
dl { gap: 10px 14px; }
.hl { border-radius: 12px; padding: 11px 14px; font-weight: 500; }
.meal { border-top: 1px dashed var(--line); }
.meal-date { font-weight: 800; }
.events li { border-bottom: 1px dashed var(--line); }
.cta { border-radius: 20px; padding: 22px; background: var(--brand); box-shadow: 0 10px 28px rgba(49,130,246,.25); }
.cta-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.cta-btn { border-radius: 12px; padding: 11px 18px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.btn { border-radius: 11px; font-weight: 600; padding: 9px 14px; }
.btn:hover { background: var(--accent-soft); }
.cal { background: var(--accent-soft); border: none; border-radius: 14px; padding: 14px; margin-top: 14px; }
.cal-title { color: var(--accent-ink); }
.links { gap: 6px; }
.links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); background: var(--panel);
           border: 1px solid var(--line); padding: 7px 12px 7px 10px; border-radius: 999px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-sm); }
.links a::after { content: "↗"; font-size: 11px; color: var(--muted); }
.links a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.kind { background: var(--accent-soft); color: var(--accent-ink); }
.kind b { color: var(--accent-ink); }
.achip[aria-pressed="true"] { box-shadow: 0 2px 8px color-mix(in srgb, var(--holiday) 35%, transparent); }
table.tt th, table.tt td, table.vac th, table.vac td { border-bottom: 1px dashed var(--line); }
.inline-cta { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: var(--accent-soft); color: var(--accent-ink);
              padding: 9px 14px; border-radius: 12px; }
.minimap { border-radius: 14px; }
.near-group ul { list-style: none; padding-left: 0; }
.near-group li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.near-group li:last-child { border-bottom: none; }
.near-group a { font-weight: 600; text-decoration: none; color: var(--text); }
.near-group a:hover { color: var(--accent); }
.gus a { display: inline-block; margin: 3px 2px; padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
         text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.gus a:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.gus b { display: inline-block; margin: 3px 2px; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; }
footer { margin-top: 28px; }
@media (max-width: 520px) {
  section { padding: 16px 14px; }
  table.tt, table.vac { min-width: 0; font-size: 12.5px; }
  table.tt th, table.tt td { padding: 6px 2px; }
  table.tt.cls td { font-size: 12px; word-break: keep-all; }
  table.tt thead th .muted, table.tt td .muted { font-size: 10.5px; }
  .top-brand { font-size: 14px; }
  .top-link, .top-compare { padding: 6px 10px; font-size: 12.5px; }
  h1 { font-size: 25px; }
}

/* 방학 한눈에: 자치구 타일 */
.gu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.gu-tile { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 14px; border-radius: 14px;
           background: var(--bg); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px;
           transition: background .15s, border-color .15s, transform .15s; }
.gu-tile:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); transform: translateY(-1px); }
.gu-tile.on { background: var(--accent); border-color: var(--accent); color: #fff; justify-content: center; }
.gu-arrow { color: var(--muted); font-size: 18px; line-height: 1; }
.gu-tile:hover .gu-arrow { color: var(--accent-ink); }
@media (max-width: 520px) { .gu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gu-tile { padding: 11px 10px; font-size: 14px; } }

/* 시간표 꾸미기 */
.cls-pick { align-items: center; flex-wrap: wrap; }
.cls-pick select { font-weight: 700; padding: 8px 30px 8px 12px; border-radius: 10px; }
.cls-hint { font-size: 12px; }
table.tt { border-collapse: separate; border-spacing: 3px; }
table.tt th, table.tt td { border-bottom: none !important; }
table.tt thead th { font-size: 13px; font-weight: 800; padding: 6px 2px 8px; border-radius: 10px; }
table.tt thead th.today { background: var(--accent); color: #fff; }
table.tt thead th.today .muted { color: rgba(255,255,255,.85); }
table.tt th[scope="row"] { font-size: 12.5px; }
table.tt.cls td { padding: 0; height: 38px; }
table.tt.cls td.today { background: var(--accent-soft); border-radius: 10px; }
.pno { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
       background: var(--bg); border: 1px solid var(--line); font-size: 11.5px; font-weight: 800; color: var(--muted); }
.subj { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 34px; padding: 4px; border-radius: 9px;
        background: hsl(var(--h) 85% 94%); color: hsl(var(--h) 55% 28%); font-weight: 700; font-size: 12.5px; line-height: 1.25; word-break: keep-all; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .subj { background: hsl(var(--h) 32% 22%); color: hsl(var(--h) 75% 84%); }
}
table.dismiss td.dm { padding: 8px 2px; border-radius: 10px; background: color-mix(in srgb, var(--accent) calc(var(--k, 4) * 3%), var(--panel)); }
table.dismiss td.dm b { display: block; font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
table.dismiss td.dm span { display: block; font-size: 11px; color: var(--muted); }
table.dismiss td.dm.today { outline: 2px solid var(--accent); outline-offset: -2px; }
table.dismiss td.empty { background: var(--bg); color: var(--muted); }
@media (max-width: 520px) {
  table.tt { border-spacing: 2px; }
  .subj { font-size: 11.5px; min-height: 32px; padding: 3px 2px; }
  table.dismiss td.dm b { font-size: 12.5px; }
  .cls-hint { display: none; }
}

/* 머리 카드 숫자 요약 */
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.hs { background: var(--bg); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.hs-k { font-size: 12px; color: var(--muted); font-weight: 600; }
.hs-v { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }

/* 맞벌이·돌봄 타일 */
.care-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.care-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.care-tile.dim { opacity: .6; }
.care-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); flex: none;
            display: grid; place-items: center; font-size: 20px; box-shadow: var(--shadow-sm); }
.care-txt { display: grid; gap: 1px; min-width: 0; }
.care-k { font-size: 12px; color: var(--muted); font-weight: 600; }
.care-v { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; word-break: keep-all; }
.care-basis { margin: 10px 2px 0; font-size: 12px; }
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-grid { grid-template-columns: 1fr; }
}

/* ---------- 급식 카드 */
.meal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.meal-card { background: var(--bg); border-radius: 16px; padding: 12px 12px 10px; border: 1px solid transparent; }
.meal-card.today { background: var(--panel); border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 18%, transparent); }
.md-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.md-dow { width: 28px; height: 28px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center;
          font-weight: 800; font-size: 14px; }
.meal-card.today .md-dow { background: var(--accent); border-color: var(--accent); color: #fff; }
.md-date { font-weight: 700; color: var(--muted); font-size: 13px; }
.md-today { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.md-kind { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); font-weight: 700; margin: 4px 0 2px; }
.md-kcal { font-weight: 600; background: var(--panel); border-radius: 999px; padding: 1px 7px; }
.md-dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; line-height: 1.4; }
.md-dishes li { padding-left: 10px; position: relative; word-break: keep-all; }
.md-dishes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ---------- 학사일정 타임라인 */
.off-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--hl-bg); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.off-title { font-weight: 800; color: var(--hl-text); font-size: 13.5px; margin-right: 4px; }
.off-pill { background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.off-pill b { color: var(--holiday); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--bg); }
.ev-day { width: 52px; flex: none; text-align: center; display: grid; line-height: 1.1; padding: 6px 0; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.ev-day b { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.ev-day span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.ev-body { display: grid; gap: 2px; min-width: 0; }
.ev-name { font-weight: 700; font-size: 14.5px; word-break: keep-all; }
.ev-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.ev-meta:empty { display: none; }
.ev-tag { font-size: 11px; font-weight: 800; color: #fff; background: var(--holiday); border-radius: 999px; padding: 1px 8px; }
.ev.holiday .ev-day { background: color-mix(in srgb, var(--holiday) 10%, var(--panel)); border-color: color-mix(in srgb, var(--holiday) 35%, transparent); }
.ev.holiday .ev-day b { color: var(--holiday); }

/* ---------- 학생 수 타일·추이 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.st { background: var(--bg); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.st-k { font-size: 12px; color: var(--muted); font-weight: 600; }
.st-v { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.trend { height: 170px; gap: 14px; padding: 22px 6px 0; background: var(--bg); border-radius: 14px; margin-top: 0; }
.bar-fill { max-width: 56px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #12b886)); }
.bar:last-child .bar-fill { box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.bar-v { font-weight: 700; color: var(--text); font-size: 12px; }
.bar-y { font-weight: 700; padding-bottom: 8px; }

/* ---------- 주변 */
.acad-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.acad-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; }
.acad-card > div { display: grid; }
.acad-n { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.acad-card .kinds { margin: 0 0 0 auto; }
.near-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.near-card { background: var(--bg); border-radius: 16px; padding: 10px 8px 6px; }
.near-card .near-title { padding: 0 6px 6px; font-weight: 800; }
.near-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 10px; text-decoration: none; color: var(--text); }
.near-row:hover { background: var(--panel); box-shadow: var(--shadow-sm); }
.near-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-dist { display: inline-flex; gap: 6px; align-items: center; flex: none; font-size: 11.5px; color: var(--muted); }
.badge-d { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.minimap { margin-top: 12px; height: 240px; }

/* ---------- 학교 정보 */
.info-dl { grid-template-columns: 110px 1fr; gap: 0; }
.info-dl dt, .info-dl dd { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.info-dl dt:last-of-type, .info-dl dd:last-of-type { border-bottom: none; }

@media (max-width: 520px) {
  .meal-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .meal-card { padding: 10px; }
  .md-dishes { font-size: 13px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .st-v { font-size: 18px; }
  .acad-card .kinds { margin-left: 0; }
  .info-dl { grid-template-columns: 92px 1fr; }
}

/* ---------- 학원 목록 */
.acad-btn { margin-left: auto; font-weight: 700; font-size: 13.5px; padding: 9px 14px; border-radius: 11px; border: none; cursor: pointer;
            background: var(--accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.acad-btn[aria-expanded="true"] { background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.acad-card .kinds { margin: 0; }
.acad-list { background: var(--bg); border-radius: 16px; padding: 10px; margin: -2px 0 12px; }
.acad-list[hidden] { display: none; }
.acad-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.acad-tab { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.acad-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.acad-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.acad-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; text-decoration: none; color: var(--text); }
.acad-row:hover { background: var(--panel); box-shadow: var(--shadow-sm); }
.acad-no { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 800;
           color: var(--muted); background: var(--panel); border: 1px solid var(--line); }
.acad-main { display: grid; min-width: 0; flex: 1; }
.acad-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-dist { flex: none; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.acad-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.acad-note { margin: 8px 4px 0; font-size: 11.5px; }
@media (max-width: 520px) { .acad-btn { margin-left: 0; width: 100%; } }
@media (min-width: 640px) { .meal-grid { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .md-dishes { font-size: 13px; } }
.acad-tab small { font-size: 11px; font-weight: 600; opacity: .75; margin-left: 2px; }
.ev-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-line + .ev-line { margin-top: 3px; }
.ev-body .ev-meta { font-size: 12px; color: var(--muted); }
.ev-more summary { list-style: none; cursor: pointer; margin: 8px 0; padding: 9px; border-radius: 12px; text-align: center;
                   font-size: 13px; font-weight: 700; color: var(--accent-ink); background: var(--bg); border: 1px dashed var(--line); }
.ev-more summary::-webkit-details-marker { display: none; }
.ev-more summary::after { content: " ▾"; }
.ev-more[open] summary::after { content: " ▴"; }
.ev-more .close-txt, .ev-more[open] .open-txt { display: none; }
.ev-more[open] .close-txt { display: inline; }
.timeline:empty { display: none; }

/* 머리 카드 태그 · 유형 설명 · 학교군 */
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.htag { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text); }
.type-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; line-height: 1.55; }
.type-note b { margin-right: 4px; }
.group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-pill { font-size: 15px; font-weight: 800; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff; }
section .near-card { margin-top: 12px; }
.md-head { flex-wrap: wrap; row-gap: 4px; }
.md-today { white-space: nowrap; }

/* 유치원: 특징 태그 · 하루 운영 막대 · 연령반 카드 */
.htag.feat { background: color-mix(in srgb, #f76707 10%, var(--panel)); border-color: color-mix(in srgb, #f76707 30%, transparent); color: var(--text); }
.host-link { display: inline-block; margin-top: 4px; font-weight: 800; color: var(--accent-ink); text-decoration: none; }
.daybar { position: relative; padding: 6px 4px 22px; }
.db-track { position: relative; height: 26px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.db-seg { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.db-seg.core { background: linear-gradient(90deg, #ffa94d, #f76707); top: 4px; bottom: 4px; }
.db-seg.after { background: color-mix(in srgb, #7048e8 30%, var(--panel)); }
.db-scale { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 16px; }
.db-scale span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 600; }
.db-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 700; margin-top: 4px; }
.db-legend span { display: inline-flex; align-items: center; gap: 6px; }
.db-key { width: 14px; height: 8px; border-radius: 999px; display: inline-block; }
.db-key.core { background: #f76707; }
.db-key.after { background: color-mix(in srgb, #7048e8 45%, var(--panel)); }
.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.age-card { background: var(--bg); border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; border-top: 3px solid #f76707; }
.age-label { font-size: 13px; font-weight: 800; color: #e8590c; }
.age-n { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.age-n small { font-size: 14px; margin-left: 1px; }
.age-sub { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .age-grid { grid-template-columns: 1fr 1fr; } }

/* 즐겨찾기 버튼 */
.top-fav { display: inline-flex; align-items: center; gap: 2px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--panel); color: var(--text); }
.top-fav[aria-pressed="true"] { color: #e67700; background: #fff4e6; border-color: #ffd8a8; }
@media (max-width: 520px) { .top-fav span { display: none; } .top-fav { padding: 6px 10px; } }

/* 시간표: 요일 칸 너비를 똑같이 (긴 과목명은 줄바꿈) */
table.tt.cls { table-layout: fixed; }
table.tt.cls thead th:first-child, table.tt.cls th[scope="row"] { width: 36px; }
table.tt.cls td { word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 520px) { table.tt.cls thead th:first-child, table.tt.cls th[scope="row"] { width: 26px; } }

/* 학교 정보: 연락처 카드 + 항목 타일 */
.ic-contact { display: grid; gap: 8px; margin-bottom: 12px; }
.ic-addr, .ic-call { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.ic-ico, .ic-call > span:first-child { width: 36px; height: 36px; flex: none; border-radius: 11px; background: var(--panel); display: inline-flex;
  align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ic-addr-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ic-addr-t b, .ic-call b { font-size: 14.5px; font-weight: 700; word-break: keep-all; }
.ic-btns { display: flex; gap: 6px; flex: none; }
.ic-btn { font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ic-btn:hover { border-color: var(--accent); color: var(--accent); }
.ic-call { text-decoration: none; color: var(--text); }
.ic-call > span:nth-child(2) { flex: 1; display: grid; gap: 1px; }
.ic-call-go { flex: none; font-size: 12.5px; font-weight: 800; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: #fff; }
.ic-call:hover .ic-call-go { filter: brightness(1.08); }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-flow: row dense; gap: 8px; }
.ic-tile { border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; display: grid; gap: 3px; align-content: start; background: var(--panel); }
.ic-tile.wide { grid-column: span 2; }
.ic-k { font-size: 12px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.ic-v { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; word-break: keep-all; }
.ic-sub { font-size: 12px; color: var(--muted); }
.ic-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 4px; }
.ic-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand, var(--accent)); }
@media (max-width: 520px) {
  .ic-grid { grid-template-columns: 1fr 1fr; }
  .ic-addr { flex-wrap: wrap; }
  .ic-btns { width: 100%; padding-left: 48px; }
  .ic-tile { padding: 10px 11px; }
  .ic-v { font-size: 14px; }
}
.ic-v.nw { white-space: nowrap; }

/* 학원 목록: 전체 수, 더 보기 */
.acad-total { padding: 2px 8px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); list-style: none; }
.acad-more { display: block; width: 100%; margin-top: 6px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line);
  background: var(--panel); font: inherit; font-size: 13.5px; font-weight: 700; color: var(--accent-ink); cursor: pointer; }
.acad-more:hover { border-color: var(--accent); background: var(--accent-soft); }

/* 지도 패널에서 #바로가기로 들어올 때 위쪽 막대에 가리지 않게 */
section[id] { scroll-margin-top: 72px; }
