:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --line: #e4e7ec;
  --brand: #2f5bea;
  --brand-weak: #e8eeff;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --err-weak: #fdecec;
  --warn-weak: #fff6e5;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --line: #2a2f38;
    --brand: #7b9bff;
    --brand-weak: #1e2846;
    --err-weak: #3a1d1d;
    --warn-weak: #3a2c12;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.55;
  word-break: keep-all;
}
a { color: var(--brand); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 28px 0 20px; margin-bottom: 16px; }
.top h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.sub { margin: 4px 0 0; color: var(--muted); }
h2 { font-size: 18px; margin: 0; }
.sec-title { margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.notice-box {
  background: var(--warn-weak);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.push-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.push-head p { margin: 2px 0 0; }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.help { margin-top: 12px; padding: 12px; background: var(--brand-weak); border-radius: 10px; font-size: 14px; }
.help ol { margin: 6px 0 0; padding-left: 20px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.btn {
  font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: 10px; cursor: pointer; min-height: 40px;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }

.badge { font-size: 12px; font-weight: 600; background: var(--brand-weak); color: var(--brand); padding: 3px 8px; border-radius: 999px; }

.feed { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feed li { padding: 12px 16px; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.feed .univ { font-weight: 700; color: var(--text); }
.feed a.title { display: block; color: var(--text); text-decoration: none; font-weight: 500; margin-top: 2px; }
.feed a.title:hover { text-decoration: underline; }
.feed li.is-new { background: var(--brand-weak); }

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
#q { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.list { display: grid; gap: 10px; }
.univ-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.univ-card.picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.univ-row { display: flex; align-items: center; gap: 10px; }
.star { font-size: 22px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; min-width: 36px; min-height: 36px; }
.star[aria-pressed="true"] { color: #f5b301; }
.univ-name { font-weight: 700; font-size: 16px; }
.region { font-size: 12px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0 46px; font-size: 14px; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.status { margin: 8px 0 0 46px; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.error { background: var(--err); }
.status.error { color: var(--err); }
.latest { margin: 8px 0 0 46px; font-size: 14px; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.latest a { color: var(--text); }

.foot { color: var(--muted); font-size: 13px; padding-top: 32px; padding-bottom: 40px; }
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 10; max-width: calc(100% - 32px);
}
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px 20px; }
.prose h2 { margin-top: 20px; }

@media (max-width: 520px) {
  .links, .status, .latest { margin-left: 0; }
  .top h1 { font-size: 22px; }
}
