:root {
  --ink: #171717; --sub: #6b7280; --line: #eceef1; --bg: #fff; --soft: #f7f8fa;
  --blue: #2563eb; --blue-soft: #eff5ff; --red: #dc2626; --amber: #b45309;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* 머리 */
.top { display: flex; align-items: center; gap: 28px; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; white-space: nowrap; flex-shrink: 0; }
.top nav, .tabs { scrollbar-width: none; }
.logo i { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--blue); transform: rotate(-45deg); display: inline-block; position: relative; }
.logo i::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.top nav { display: flex; gap: 22px; font-weight: 600; overflow-x: auto; white-space: nowrap; }
.top nav a { padding: 6px 0; color: #374151; }
.top nav a.on { color: var(--blue); box-shadow: inset 0 -2px var(--blue); }
.checked { font-size: 12px; color: var(--sub); margin: 0 0 10px; }
.stale { background: #fef3c7; color: #92400e; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

/* 파란 안내 띠(알림) */
.alert { background: var(--blue-soft); border-radius: 10px; padding: 14px 18px; margin: 0 0 22px; }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alert b { color: #1e3a8a; }
.alert small { display: block; color: #475569; }
.alert form { margin-top: 12px; display: none; }
.alert.open form { display: block; }
.alert input[type=email] { width: min(100%, 320px); height: 40px; padding: 0 12px; border: 1px solid #c7d2fe; border-radius: 8px; background: #fff; margin: 0 4px 6px 0; }
.alert label { display: block; font-size: 13px; color: #374151; margin-top: 6px; }
.alert .msg { margin-top: 8px; font-size: 14px; font-weight: 600; }
.alert .msg.err { color: var(--red); } .alert .msg.ok { color: #15803d; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn.line { background: #fff; color: var(--ink); border: 1px solid #d1d5db; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.chip { height: 34px; padding: 0 13px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

h1 { font-size: 24px; margin: 6px 0 14px; letter-spacing: -.3px; }
h2 { font-size: 18px; margin: 28px 0 10px; }

/* 필터 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filters select, .filters input[type=search] { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.filters input[type=search] { flex: 1; min-width: 160px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 6px; padding-bottom: 2px; }
.tabs button { height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--soft); color: #374151; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; }

/* 목록 */
.list-head, .row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 80px 150px 90px 92px; gap: 12px; align-items: center; padding: 0 12px; }
.list-head { height: 40px; background: var(--soft); border-radius: 8px; color: var(--sub); font-size: 13px; }
.list-head span:nth-child(n+2), .row > :nth-child(n+2) { text-align: center; }
.row { padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.row:hover { background: #fafbfc; }
.row .nm { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .ad { color: var(--sub); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.src.ah { background: #e0edff; color: #1d4ed8; } .src.lh { background: #dcfce7; color: #166534; }
.fix { color: var(--red); font-size: 12px; font-weight: 700; margin-left: 4px; }
.dday { font-weight: 700; }
.dday.hot { color: var(--red); } .dday.soon { color: var(--blue); } .dday.end { color: #9ca3af; font-weight: 500; }
.empty { padding: 48px 0; text-align: center; color: var(--sub); }
.more { display: block; margin: 16px auto 0; }
.count { color: var(--sub); font-size: 13px; margin: 10px 2px; }

/* 달력 */
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; gap: 8px; }
.cal-bar h2 { margin: 0; font-size: 20px; flex: 1; text-align: center; }
.cal-bar .grp { display: flex; gap: 4px; }
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal .wd { background: var(--soft); text-align: center; font-size: 13px; color: var(--sub); padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal .day:nth-child(5n) { border-right: 0; }
.cal .day.out { background: #fcfcfd; } .cal .day.out .num { color: #c4c8cf; }
.cal .num { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: inline-block; min-width: 22px; text-align: center; }
.cal .today .num { background: var(--blue); color: #fff; border-radius: 999px; padding: 0 6px; }
.ev { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 2px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ev:hover { text-decoration: underline; }
.k { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.k-sp { background: #ede9fe; color: #6d28d9; } .k-r1 { background: #dbeafe; color: #1d4ed8; } .k-r2 { background: #e0f2fe; color: #0369a1; }
.k-no { background: #ffedd5; color: #c2410c; } .k-ap { background: #dcfce7; color: #15803d; } .k-re { background: #f3f4f6; color: #4b5563; }
.k-po { background: #ccfbf1; color: #0f766e; } .k-cl { background: #fee2e2; color: #b91c1c; }
.more-ev { font-size: 12px; color: var(--blue); border: 0; background: none; cursor: pointer; padding: 2px 0; }
.week .wday { border-bottom: 1px solid var(--line); padding: 12px 2px; }
.week .wday h3 { margin: 0 0 6px; font-size: 15px; }
.week .wday.today h3 { color: var(--blue); }
.week .ev { white-space: normal; padding: 5px 0; font-size: 14px; }
.week .none { color: #9ca3af; font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--sub); margin: 10px 0; }
.summary { background: var(--soft); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.summary h2 { margin: 0 0 6px; font-size: 16px; }
.official { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }

dialog { border: 0; border-radius: 14px; padding: 22px; width: min(92vw, 440px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h3 { margin: 0 0 6px; font-size: 18px; }
dialog ul { list-style: none; padding: 0; margin: 10px 0 14px; }
dialog li { padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
dialog .acts { display: flex; gap: 8px; flex-wrap: wrap; }
dialog .x { float: right; border: 0; background: none; font-size: 22px; cursor: pointer; line-height: 1; }

/* 상세 */
.crumb { font-size: 13px; color: var(--sub); margin: 8px 0; }
.meta { color: var(--sub); margin: -6px 0 14px; }
.banner { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--soft); color: var(--sub); font-weight: 600; white-space: nowrap; }
td.n, th.n { text-align: right; }
.scroll { overflow-x: auto; }
.cta { margin: 18px 0 6px; }
.cta .btn { height: 48px; padding: 0 22px; font-size: 16px; }
.note { font-size: 13px; color: var(--sub); }
.related a { display: block; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.guide dt { font-weight: 700; margin-top: 16px; } .guide dd { margin: 4px 0 0; color: #374151; }

footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--sub); font-size: 13px; }

@media (max-width: 760px) {
  .top { gap: 14px; } .top nav { gap: 14px; font-size: 14px; }
  h1 { font-size: 21px; }
  .list-head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .row > :nth-child(n+2) { text-align: left; font-size: 13px; }
  .row > .c-period, .row > .c-result { color: var(--sub); }
  .row > .c-type, .row > .c-units, .row > .c-result.none { display: none; }
  .row > .c-name { grid-column: 1 / -1; }
  .row > .c-dday { text-align: right; grid-row: 2 / 4; grid-column: 2; align-self: center; font-size: 14px; }
  .row > .c-result::before { content: "발표 "; }
  .filters select { flex: 1; }
  .cal .day { min-height: 84px; padding: 3px; } .ev { font-size: 11px; } .k { padding: 0 3px; margin-right: 2px; }
}
