:root {
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #201a1d;
  background: #f7f4f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #f7f4f5; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.topbar {
  max-width: 1040px;
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top)) 24px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.brand { max-width: 680px; }
.eyebrow {
  margin: 0 0 8px;
  color: #8a5163;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}
h1 { margin: 0; font-size: clamp(34px, 7vw, 56px); line-height: 1; letter-spacing: -.05em; }
.subtitle { margin: 14px 0 0; color: #6c6266; line-height: 1.55; font-size: 15px; }

.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.primary, .ghost, .ghost-small {
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}
.primary {
  border: 1px solid #7a1e3a;
  background: #7a1e3a;
  color: #fff;
  padding: 10px 15px;
}
.ghost, .ghost-small {
  border: 1px solid #ded5d8;
  background: rgba(255,255,255,.75);
  color: #4d4145;
}
.ghost { padding: 10px 14px; }
.ghost-small { padding: 7px 11px; font-size: 13px; }
button:disabled { opacity: .55; cursor: default; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px calc(64px + env(safe-area-inset-bottom));
}

.summary {
  background: #3a1723;
  color: #fff;
  border-radius: 24px;
  padding: 21px 23px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  box-shadow: 0 18px 55px rgba(77, 29, 45, .12);
}
.summary-main { display: flex; align-items: center; gap: 13px; }
.summary-main p { margin: 5px 0 0; color: #d9c9cf; font-size: 13px; line-height: 1.4; }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #bbb1b5;
  box-shadow: 0 0 0 6px rgba(255,255,255,.07);
}
.status-dot.ok { background: #80dfaa; }
.status-dot.warn { background: #f0c66f; }
.summary-counts { display: flex; gap: 28px; }
.summary-counts div { display: grid; text-align: right; }
.summary-counts b { font-size: 22px; }
.summary-counts span { color: #d9c9cf; font-size: 11px; margin-top: 2px; }

.source-strip {
  margin: 14px 2px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: #7a7074;
  font-size: 12px;
}
.source-strip a { color: #7a1e3a; font-weight: 750; text-decoration: none; }
.source-strip a:hover { text-decoration: underline; text-underline-offset: 3px; }

.ad-slot {
  border: 1px dashed #d8cdd1;
  background: rgba(255,255,255,.5);
  color: #9a8f93;
  border-radius: 16px;
  min-height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  text-align: center;
}
.ad-slot-top { margin: 22px 0; }
.ad-slot-feed { margin: 3px 0; min-height: 104px; }
.ad-slot span { font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.ad-slot p { margin: 0; font-size: 12px; }

.toolbar {
  margin: 18px 0;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-wrap { flex: 1 1 360px; }
.search-wrap input {
  width: 100%;
  border: 1px solid #ddd4d7;
  background: rgba(255,255,255,.84);
  border-radius: 15px;
  padding: 12px 14px;
  outline: none;
}
.search-wrap input:focus {
  border-color: #b47b8d;
  box-shadow: 0 0 0 3px rgba(122,30,58,.08);
}
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 7px; color: #665b5f; font-size: 13px; white-space: nowrap; }
.toggle input { accent-color: #7a1e3a; }

.notice-list { display: grid; gap: 12px; }
.notice-card {
  background: rgba(255,255,255,.88);
  border: 1px solid #e5dfe1;
  border-radius: 20px;
  padding: 18px 19px 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.notice-card:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(74,40,52,.07); }
.notice-card.read-card { opacity: .65; background: rgba(247,245,245,.78); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}
.badge.khu { background: #f0dfe5; color: #6f1d37; }
.badge.new { background: #fae6bb; color: #784b11; }
.badge.read { background: #ece8e9; color: #766c70; }
.posted { color: #91858a; font-size: 12px; white-space: nowrap; }
.notice-card h2 { margin: 13px 0 15px; font-size: 18px; line-height: 1.48; letter-spacing: -.015em; }
.notice-title { color: inherit; text-decoration: none; }
.notice-title:hover { text-decoration: underline; text-underline-offset: 3px; }

.card-actions {
  border-top: 1px solid #f0ebed;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.open-link { color: #7a1e3a; text-decoration: none; font-size: 13px; font-weight: 800; }
.secondary-actions { display: flex; gap: 7px; align-items: center; }

.empty { text-align: center; padding: 70px 20px; color: #766b70; }
.empty strong { color: #3e3539; }
.empty p { margin: 8px 0 0; font-size: 13px; }

.site-footer {
  margin-top: 28px;
  border-top: 1px solid #e5dfe1;
  padding-top: 18px;
  color: #81767a;
  font-size: 11px;
  line-height: 1.55;
}
.site-footer p { margin: 4px 0; }
.site-footer strong { color: #5a4f53; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.install-dialog {
  width: min(calc(100% - 32px), 460px);
  border: 0; border-radius: 24px; padding: 0; background: transparent; color: inherit;
}
.install-dialog::backdrop { background: rgba(35,20,25,.55); backdrop-filter: blur(4px); }
.install-dialog-card {
  position: relative; background: #fff; border: 1px solid #e4dbde; border-radius: 24px;
  padding: 28px; box-shadow: 0 24px 80px rgba(52,26,35,.22);
}
.install-dialog-card h2 { margin: 0 32px 14px 0; font-size: 24px; letter-spacing: -.03em; }
.install-dialog-card ol { margin: 0; padding-left: 22px; color: #5c5155; line-height: 1.65; }
.install-dialog-card li + li { margin-top: 7px; }
.install-note {
  margin: 18px 0 0; padding: 12px 14px; border-radius: 14px;
  background: #f6ecef; color: #6e3548; font-size: 13px; line-height: 1.5;
}
.install-dialog-close {
  position: absolute; top: 15px; right: 16px; border: 0; background: transparent;
  color: #81747a; font-size: 28px; line-height: 1; cursor: pointer;
}
.install-dialog-done {
  width: 100%; margin-top: 16px; border: 0; border-radius: 14px; padding: 12px 14px;
  background: #7a1e3a; color: #fff; font-weight: 800; cursor: pointer;
}

@media (max-width: 720px) {
  .topbar { padding: calc(31px + env(safe-area-inset-top)) 18px 16px; display: block; }
  .header-actions { justify-content: flex-start; margin-top: 18px; }
  main { padding: 0 18px calc(52px + env(safe-area-inset-bottom)); }
  .summary { align-items: flex-start; padding: 18px; }
  .summary-counts { gap: 14px; }
  .summary-counts span { max-width: 44px; }
  .toolbar { display: block; }
  .filter-row { margin-top: 11px; }
  .notice-card { padding: 16px; }
  .card-actions { align-items: flex-start; }
}
