@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@latest/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================================
   LLMHub — Light · deep green · rounded & roomy
   (클래스명은 기존 유지, 토큰만 디자인 시스템으로 교체)
   ============================================================ */
:root {
  /* surfaces / neutrals */
  --bg: #F3F5F3;
  --surface: #FFFFFF;
  --surface-2: #FAFBFA;
  --surface-3: #F0F3F0;
  --ink: #11160F;
  --ink-2: #394136;
  --muted: #6E766C;
  --faint: #99A095;
  --border: #E5E9E4;
  --border-2: #D6DBD4;

  /* brand: deep green */
  --accent: #146A45;
  --accent-2: #1B8158;
  --accent-press: #0F5236;
  --accent-soft: #E7F1EB;
  --accent-soft2: #D2E6DB;
  --accent-ink: #0C3C28;
  --ring: rgba(20,106,69,.22);

  /* status */
  --pos: #1B8158; --pos-bg: #E7F1EB;
  --warn: #B7791F; --warn-bg: #FBF1DD;
  --neg: #C0432E;  --neg-bg: #FAE9E4;
  --info: #2C72E0; --info-bg: #E6EFFC;

  /* radius / shadow */
  --r-sm: 11px; --r-md: 14px; --r-lg: 20px; --radius: 14px; --r-pill: 999px;
  --sh-xs: 0 1px 2px rgba(16,22,15,.05);
  --sh-sm: 0 1px 2px rgba(16,22,15,.05), 0 2px 6px -2px rgba(16,22,15,.06);
  --sh-md: 0 6px 22px -8px rgba(16,22,15,.14), 0 2px 6px -2px rgba(16,22,15,.06);
  --sh-accent: 0 10px 26px -10px rgba(20,106,69,.42);

  /* fonts */
  --font-display: 'Space Grotesk', 'Pretendard', system-ui, sans-serif;
  --font-sans: 'Pretendard', 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* legacy aliases (인라인 var 참조 호환) */
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --text: var(--ink);
  --error-bg: var(--neg-bg); --error-fg: var(--neg);
  --ok-bg: var(--pos-bg);    --ok-fg: var(--pos);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

::selection { background: var(--accent-soft2); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d7ddd6; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 26px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  color: var(--ink); letter-spacing: -.02em;
}
.topbar .brand:hover { text-decoration: none; }
.topbar .brand .hub { color: var(--accent); }
.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--ink-2); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--r-pill); transition: background .15s, color .15s;
}
.topbar nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.topbar nav .muted { padding: 0 6px; }

/* ---------- App shell (global sidebar, logged-in) ---------- */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-side {
  width: 236px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.app-brand { display: flex; align-items: center; gap: 9px; padding: 15px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.app-brand:hover { text-decoration: none; }
.app-brand .hub { color: var(--accent); }
.app-nav { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.app-nav-label { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .05em; padding: 14px 10px 5px; }
.app-nav-label .soon { font-weight: 500; }
.app-link { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-md);
  color: var(--ink-2); font-size: 14px; font-weight: 500; }
.app-link .ic { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.app-link:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.app-link.active { background: var(--accent-soft); color: var(--accent-ink); }
.app-link.disabled { opacity: .5; cursor: default; }
.app-side-bottom { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.app-user { display: flex; align-items: center; gap: 8px; }
.app-user-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.app-user-name { font-size: 13px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-logout { font-size: 12.5px; color: var(--muted); }
.app-powered { font-size: 11px; color: var(--faint); }
.app-powered .hub { color: var(--accent); font-weight: 600; }
.app-powered .cantstop { color: inherit; text-decoration: none; cursor: default; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: center; gap: 10px; padding: 11px 22px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 20; }
.app-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.app-toggle { display: none; }
.app-content { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 26px 24px 70px; }
.app-scrim { display: none; }
@media (max-width: 880px) {
  .app-side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 40; transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: var(--sh-md); }
  .app-shell.open .app-side { transform: none; }
  .app-toggle { display: inline-flex; }
  .app-scrim { position: fixed; inset: 0; background: rgba(16,22,15,.32); z-index: 35; }
  .app-shell.open .app-scrim { display: block; }
  .app-content { padding: 20px 16px 60px; }
}

/* ---------- Layout ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 30px 22px 70px; }
h1 { font-family: var(--font-display); font-size: 27px; letter-spacing: -.02em; margin: 6px 0 20px; }
h2 { font-family: var(--font-display); font-size: 18px; letter-spacing: -.01em; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- Buttons ---------- */
.btn, .btn-ghost, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-pill); font-weight: 600; font-family: var(--font-sans);
  cursor: pointer; border: 1px solid transparent; transition: transform .15s var(--ease), filter .15s, background .15s, box-shadow .15s;
  white-space: nowrap; text-decoration: none;
}
.btn { background: var(--accent); color: #fff; border-color: var(--accent); padding: 11px 20px; font-size: 14.5px; box-shadow: var(--sh-accent); }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border-2); padding: 10px 18px; font-size: 14.5px; box-shadow: var(--sh-xs); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; transform: translateY(-1px); }
.btn-sm { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); padding: 6px 13px; font-size: 13px; box-shadow: var(--sh-xs); }
.btn-sm:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-sm.danger, .btn.danger { color: var(--neg); border-color: var(--neg-bg); background: var(--neg-bg); }
.btn-sm.danger:hover { border-color: var(--neg); }
[aria-disabled="true"] { opacity: .45; pointer-events: none; }
button.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--sh-xs);
}
.card-narrow { max-width: 440px; margin: 40px auto; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

.credit { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--accent); letter-spacing: -.02em; margin: 6px 0; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: none; }

/* ---------- Forms ---------- */
label { display: block; margin: 14px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  width: 100%; margin-top: 7px; padding: 11px 13px;
  background: var(--surface); border: 1.5px solid var(--border-2); border-radius: var(--r-md);
  color: var(--ink); font-size: 14.5px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
label .muted { font-weight: 400; }

/* ---------- Alerts ---------- */
.alert { padding: 11px 15px; border-radius: var(--r-md); margin: 10px 0; font-size: 14px; border: 1px solid transparent; }
.alert-error { background: var(--neg-bg); color: var(--neg); border-color: #f0cfc6; }
.alert-success { background: var(--pos-bg); color: var(--accent-ink); border-color: var(--accent-soft2); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--surface-2); }
.table tbody tr:hover { background: var(--surface-2); }
.table input.num { width: 84px; margin: 0; padding: 7px 9px; }
.table select { padding: 7px 9px; margin: 0; width: auto; }
@media (max-width: 720px) { .card { padding: 16px; } .table { font-size: 13px; } .table th, .table td { padding: 8px 8px; } }

.inline-form { display: inline; }
.inline-form select { margin: 0; }
.member-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.member-form .num { width: 72px; margin: 0; padding: 7px 9px; }
.member-form .chk { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.member-form input[type=checkbox], .chk input[type=checkbox] { width: auto; margin: 0; }
.chk { font-weight: 500; }

/* ---------- Landing hero ---------- */
.hero { text-align: center; padding: 70px 0 50px; }
.hero h1 { font-size: 40px; line-height: 1.18; margin-bottom: 18px; }
.hero .lead { color: var(--ink-2); max-width: 600px; margin: 0 auto 30px; font-size: 16.5px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } }

/* ---------- Stat band (admin dashboards) ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 820px) { .stat-band { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--sh-xs);
}
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; color: var(--ink); }
.stat .value.accent { color: var(--accent); }
.stat .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.stat .pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); margin-top: 6px; }
.pill.ok { background: var(--pos-bg); color: var(--pos); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.neg { background: var(--neg-bg); color: var(--neg); }

.admin-quicklinks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.bar { display: inline-block; width: 90px; height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.bar span { display: block; height: 100%; border-radius: 99px; }
.model-id-list { display: flex; flex-wrap: wrap; gap: 6px; }
.model-id { font-size: 12px; background: var(--surface-3); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--r-pill); color: var(--ink-2); }
code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }

/* ---------- Compare (동시 비교) ---------- */
.cmp-pick { display: flex; flex-direction: column; gap: 8px; }
.cmp-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r-md); cursor: pointer; }
.cmp-opt:hover { border-color: var(--accent); }
.cmp-opt.disabled { opacity: .55; cursor: not-allowed; }
.cmp-opt input { width: auto; margin: 0; }
.cmp-opt .cmp-name { flex: 1; font-weight: 600; font-size: 14px; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-xs); display: flex; flex-direction: column; }
.compare-head { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; font-size: 14px; }
.compare-body { white-space: normal; line-height: 1.6; font-size: 14.5px; flex: 1; }
.compare-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); text-align: right; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.filter-bar select, .filter-bar input { margin: 0; width: auto; padding: 8px 11px; font-size: 13.5px; }
.filter-bar .f-search { flex: 1; min-width: 160px; }
@media (max-width: 620px) { .filter-bar .f-search { flex: 1 1 100%; } }

/* ---------- Org gate main (portal) ---------- */
.org-hero { display: flex; align-items: center; gap: 16px; margin: 4px 0 20px; }
.org-hero-emblem {
  width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 28px; box-shadow: var(--sh-accent);
}
.org-hero-emblem img { width: 100%; height: 100%; object-fit: cover; }
.org-hero-text h1 { margin: 0 0 3px; }
.org-portal-tag { font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: var(--r-pill); vertical-align: middle; margin-left: 4px; }
.org-action .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 20px; margin-bottom: 10px; }
.org-action h2 { margin-bottom: 6px; }
.org-action .btn, .org-action .btn-ghost { margin-top: 6px; }

.engine-list { display: flex; flex-direction: column; gap: 8px; }
.engine-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.engine-row.locked { opacity: .6; }
.engine-row .engine-name { font-weight: 600; font-size: 14px; flex: 1; }

.org-edit { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.org-edit summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: 14px; }
.org-edit summary:hover { text-decoration: underline; }

/* ---------- Landing sections ---------- */
.lp-wide { max-width: 1080px; }
.lp-hero { text-align: center; padding: 60px 0 36px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
  padding: 5px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft2);
}
.lp-hero h1 { font-size: 46px; line-height: 1.14; margin: 0 0 18px; }
.lp-hero h1 .grad { color: var(--accent); }
.lp-hero .lead { color: var(--ink-2); max-width: 620px; margin: 0 auto 28px; font-size: 17px; }
@media (max-width: 600px) { .lp-hero h1 { font-size: 31px; } }

.prov-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.prov-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 14px; color: var(--ink-2); box-shadow: var(--sh-xs);
}
.prov-chip .prov-dot { width: 10px; height: 10px; }

.lp-section { padding: 46px 0; }
.lp-section + .lp-section { border-top: 1px solid var(--border); }
.lp-section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.lp-section-head h2 { font-size: 28px; margin: 0 0 10px; }
.lp-section-head p { color: var(--muted); font-size: 15.5px; margin: 0; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--sh-xs);
}
.feat .ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 22px; margin-bottom: 14px;
}
.feat h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 8px; }
.feat p { color: var(--muted); font-size: 14px; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split-card {
  border-radius: var(--r-lg); padding: 26px; border: 1px solid var(--border); background: var(--surface);
}
.split-card.accent { background: var(--accent-soft); border-color: var(--accent-soft2); }
.split-card h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 4px; }
.split-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.split-card ul { list-style: none; padding: 0; margin: 0; }
.split-card li { padding: 8px 0 8px 26px; position: relative; font-size: 14.5px; color: var(--ink-2); border-bottom: 1px solid var(--border); }
.split-card.accent li { border-color: var(--accent-soft2); }
.split-card li:last-child { border-bottom: none; }
.split-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .uc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .uc-grid { grid-template-columns: 1fr; } }
.uc {
  display: flex; align-items: center; gap: 11px; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  font-weight: 600; font-size: 14.5px; color: var(--ink-2); box-shadow: var(--sh-xs);
}
.uc .e { font-size: 19px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 16px; margin: 0 0 6px; }
.step p { color: var(--muted); font-size: 13.5px; margin: 0; }

.cta-band {
  text-align: center; padding: 46px 28px; border-radius: var(--r-lg); margin: 12px 0 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-press) 100%);
  color: #fff; box-shadow: var(--sh-accent);
}
.cta-band h2 { color: #fff; font-size: 26px; margin: 0 0 10px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0 0 22px; font-size: 15px; }
.cta-band .btn { background: #fff; color: var(--accent); border-color: #fff; }
.cta-band .btn:hover { background: #fff; color: var(--accent-press); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

/* ---------- Notice ---------- */
.notice {
  margin-top: 22px; padding: 13px 15px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); font-size: 13px;
}

/* ---------- Chat ---------- */
.chat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chat-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
label.inline { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 600; }
label.inline select { margin: 0; width: auto; padding: 9px 11px; border-radius: var(--r-pill); }
.chat-meta .muted { font-size: 13px; }
.chat-meta strong { font-family: var(--font-mono); color: var(--accent); }

.chat-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px; margin: 14px 0; min-height: 340px; max-height: 56vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-empty { text-align: center; margin: auto; color: var(--faint); }
.empty-emblem { position: relative; width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; overflow: hidden;
  background: var(--pbg, var(--surface-3)); color: var(--p, var(--muted)); }
.empty-emblem .emblem-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.empty-emblem .emblem-fallback svg { width: 38px; height: 38px; }
.empty-emblem .emblem-letter { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--p, var(--muted)); }
.empty-emblem .emblem-logo { position: absolute; inset: 0; width: 100%; height: 100%; padding: 14px; object-fit: contain; }
.empty-model { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.empty-q { font-size: 20px; font-weight: 600; color: var(--ink); }
.msg { max-width: 80%; padding: 11px 15px; border-radius: 16px; line-height: 1.55; font-size: 14.5px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; box-shadow: var(--sh-accent); }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
/* 마크다운 렌더 (AI 답변 / 동시비교) */
.msg.ai .md-h, .compare-body .md-h { font-family: var(--font-display); margin: 10px 0 6px; line-height: 1.3; }
.msg.ai h3.md-h, .compare-body h3.md-h { font-size: 18px; }
.msg.ai h4.md-h, .compare-body h4.md-h { font-size: 16px; }
.msg.ai h5.md-h, .compare-body h5.md-h { font-size: 14.5px; }
.msg.ai h6.md-h, .compare-body h6.md-h { font-size: 13.5px; color: var(--ink-2); }
.msg.ai .md-h:first-child, .compare-body .md-h:first-child { margin-top: 0; }
.msg.ai .md-p, .compare-body .md-p { margin: 8px 0; }
.msg.ai .md-p:first-child, .compare-body .md-p:first-child { margin-top: 0; }
.msg.ai .md-p:last-child, .compare-body .md-p:last-child { margin-bottom: 0; }
.msg.ai .md-ul, .msg.ai .md-ol, .compare-body .md-ul, .compare-body .md-ol { margin: 8px 0; padding-left: 22px; }
.msg.ai .md-ul li, .msg.ai .md-ol li, .compare-body .md-ul li, .compare-body .md-ol li { margin: 3px 0; }
.msg.ai .md-code, .compare-body .md-code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.msg.ai .md-pre, .compare-body .md-pre { background: #1b211a; color: #e6efe9; border-radius: var(--r-md); padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.msg.ai .md-pre code, .compare-body .md-pre code { font-family: var(--font-mono); font-size: 12.5px; background: none; padding: 0; color: inherit; white-space: pre; }
.msg.ai .md-hr, .compare-body .md-hr { border: none; border-top: 1px solid var(--border-2); margin: 12px 0; }
.msg.ai .md-q, .compare-body .md-q { border-left: 3px solid var(--accent-soft2); margin: 8px 0; padding: 2px 0 2px 12px; color: var(--ink-2); }
.msg.ai strong, .compare-body strong { font-weight: 700; }
.msg.ai a, .compare-body a { color: var(--accent); }
.msg.ai .md-table, .compare-body .md-table { border-collapse: collapse; margin: 10px 0; font-size: 13px; max-width: 100%; display: block; overflow-x: auto; }
.msg.ai .md-table th, .msg.ai .md-table td, .compare-body .md-table th, .compare-body .md-table td { border: 1px solid var(--border-2); padding: 6px 9px; text-align: left; vertical-align: top; }
.msg.ai .md-table th, .compare-body .md-table th { background: var(--surface-3); font-weight: 700; }
.msg.error { background: var(--neg-bg); color: var(--neg); border-color: #f0cfc6; }
.msg-info { align-self: flex-start; font-size: 12px; color: var(--muted); margin-top: -5px; }
.msg.ai.streaming::after { content: '▌'; display: inline-block; margin-left: 1px; color: var(--accent); animation: blink 1s steps(2,start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.msg-engine { align-self: flex-start; font-size: 11.5px; color: var(--faint); margin: -6px 0 2px 4px; font-weight: 600; }
.msg-sources { align-self: flex-start; max-width: 80%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin: 2px 0 4px; }
.msg-sources .src-title { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .04em; margin-bottom: 6px; }
.msg-sources .src-item { display: block; font-size: 13px; color: var(--accent); padding: 3px 0; line-height: 1.4; }
.msg-sources .src-item:hover { text-decoration: underline; }
.msg-sources .src-host { color: var(--faint); font-size: 11.5px; }
.msg.ai.thinking { color: var(--muted); }
.thinking-status { display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; }
.chat-chips .chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-chips .chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chat-chips .chip.on { background: var(--accent-soft); border-color: var(--accent-soft2); color: var(--accent-ink); }
.msg-reason { align-self: flex-start; max-width: 80%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; margin: 2px 0; font-size: 13px; }
.msg-reason summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.msg-reason .reason-body { margin-top: 8px; color: var(--ink-2); line-height: 1.55; white-space: normal; }

.chat-input { display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; margin: 0; resize: vertical; font-size: 15px; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1.5px solid var(--border-2); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 18px; user-select: none; }
.file-btn:hover { border-color: var(--accent); }
.file-chip { margin: 6px 0; font-size: 13px; color: var(--muted); }
.file-chip a { color: var(--neg); margin-left: 6px; }

/* ---------- Chat app shell (sidebar layout) ---------- */
.chat-shell { display: flex; height: 100vh; height: 100dvh; background: var(--bg); }
.chat-sidebar { width: 282px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.side-top { padding: 15px 16px; border-bottom: 1px solid var(--border); }
.side-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--ink); }
.side-brand .hub { color: var(--accent); }
.side-emblem { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; flex-shrink: 0; overflow: hidden; }
.side-emblem img { width: 100%; height: 100%; object-fit: cover; }
.side-space { font-size: 12px; color: var(--muted); margin-top: 4px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 10px; }
.side-bottom { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--faint); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-newchat { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--sh-accent); }
.btn-newchat:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.side-label { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .06em; padding: 16px 11px 6px; }
.side-link { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: var(--r-md); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.side-link:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.recent-item { display: block; padding: 8px 11px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item:hover, .recent-item.active { background: var(--surface-3); text-decoration: none; color: var(--ink); }

.proj-context { margin: 10px 4px 0; padding: 7px 11px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-topbar { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.chat-topbar .spacer { flex: 1; }
.chat-topbar select { width: auto; margin: 0; padding: 8px 11px; border-radius: var(--r-pill); font-size: 13.5px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px 20px; }
.chat-thread { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.chat-foot { border-top: 1px solid var(--border); background: var(--surface); padding: 14px 20px; }
.chat-foot-inner { max-width: 820px; margin: 0 auto; }
.sidebar-toggle { display: none; }
.scrim { display: none; }
@media (max-width: 860px) {
  .chat-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: var(--sh-lg); }
  .chat-shell.open .chat-sidebar { transform: none; }
  .sidebar-toggle { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(16,22,15,.32); z-index: 35; }
  .chat-shell.open .scrim { display: block; }
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--border);
}
.badge.org { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft2); }
.badge.personal { background: var(--info-bg); color: var(--info); border-color: #cfe0fa; }

/* ---------- Space selection hub ---------- */
.hub-head { text-align: center; margin: 18px 0 30px; }
.hub-head h1 { margin-bottom: 8px; }
.hub-head p { color: var(--muted); font-size: 15px; margin: 0; }
.space-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px; align-items: stretch;
}
.space-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--sh-xs);
  transition: transform .15s var(--ease), box-shadow .15s, border-color .15s;
}
.space-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--accent-soft2); }
.space-card-top { display: flex; align-items: center; gap: 13px; }
.space-emblem {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
}
.space-emblem.personal { background: var(--accent-soft); color: var(--accent); }
.space-emblem img { width: 100%; height: 100%; object-fit: cover; }
.space-card h2 { margin: 0 0 4px; font-size: 17px; }
.space-card .space-name-wrap { min-width: 0; }
.space-card .space-name-wrap h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--border); }
.space-meta .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.space-meta .row .k { color: var(--faint); }
.space-meta .row .v { color: var(--ink-2); font-weight: 600; }
.space-meta .row .v.credit-sm { font-family: var(--font-mono); color: var(--accent); font-size: 15px; }
.space-card .btn { margin-top: auto; width: 100%; }

/* ---------- Org gate login ---------- */
.gate-login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  background:
    radial-gradient(1100px 480px at 50% -8%, var(--accent-soft) 0%, transparent 60%),
    var(--bg);
  padding: 28px 18px; }
.gate-login { width: 100%; max-width: 412px; }
.gate-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 34px 30px 28px; box-shadow: var(--sh-md); text-align: center;
}
.gate-emblem {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 21px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 34px;
  box-shadow: var(--sh-accent);
}
.gate-emblem img { width: 100%; height: 100%; object-fit: cover; }
.gate-title { font-family: var(--font-display); font-size: 23px; letter-spacing: -.02em; margin: 0 0 7px; }
.gate-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.gate-card form { text-align: left; }
.gate-submit { width: 100%; margin-top: 8px; }
.gate-hint { color: var(--faint); font-size: 12.5px; margin: 16px 0 0; text-align: center; }
.gate-powered { text-align: center; color: var(--faint); font-size: 12px; margin: 18px 0 0; }
.gate-powered .hub { color: var(--accent); font-weight: 600; }

/* official auth (login) extras */
.auth-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); letter-spacing: -.02em; }
.auth-brand:hover { text-decoration: none; }
.auth-brand .hub { color: var(--accent); }
.auth-links { text-align: center; font-size: 13.5px; margin: 16px 0 0; }
.auth-links .sep { color: var(--faint); margin: 0 8px; }
.auth-links .muted { font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--faint); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-note { text-align: center; color: var(--muted); font-size: 13px; margin: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; }

/* ---------- User menu / popover ---------- */
.user-menu { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 5px 10px 5px 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); font-family: inherit; font-size: 13px; color: var(--ink); }
.user-chip:hover { border-color: var(--accent); }
.user-chip-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-chip-name { font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 280px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 14px; }
.user-pop.open { display: block; }
.user-pop-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.user-pop-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.user-pop-name { font-weight: 600; font-size: 14px; }
.user-pop-sub { font-size: 12px; color: var(--muted); }
.user-pop-credits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.cred-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 11px; }
.cred-box .cl { font-size: 11.5px; color: var(--muted); }
.cred-box .cv { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.user-pop-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding: 4px 2px; }
.user-pop-links { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.user-pop-links a { padding: 7px 8px; border-radius: var(--r-sm); font-size: 13px; color: var(--ink-2); }
.user-pop-links a:hover { background: var(--surface-3); text-decoration: none; }
.user-pop-links a.danger { color: var(--neg); }

/* ---------- Provider accents ---------- */
.prov-badge, .prov-dot { --p: var(--muted); --pbg: var(--surface-3); }
[data-provider="openai"]    { --p: #0A7A6A; --pbg: #DDF1ED; }
[data-provider="anthropic"] { --p: #B5531F; --pbg: #F6E6DA; }
[data-provider="google"]    { --p: #2C72E0; --pbg: #E6EFFC; }
[data-provider="xai"]       { --p: #5B5563; --pbg: #ECEAEF; }
[data-provider="deepseek"]  { --p: #6D49C9; --pbg: #EBE5F8; }
[data-provider="perplexity"]{ --p: #1F7A8C; --pbg: #DDEEF1; }
.prov-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; color: var(--p); background: var(--pbg); letter-spacing: -.01em;
}
.prov-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--p); flex-shrink: 0; }

/* ---------- Model trigger (chat topbar) ---------- */
.model-trigger {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--surface); border: 1.5px solid var(--border-2); box-shadow: var(--sh-xs);
  font-family: inherit; font-size: 13.5px; color: var(--ink); transition: border-color .15s;
}
.model-trigger:hover { border-color: var(--accent); }
.model-trigger-name { font-weight: 600; }
.model-trigger-lvl { font-size: 12px; color: var(--muted); }
.model-trigger-caret { color: var(--faint); font-size: 11px; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(16,22,15,.4); padding: 24px; overflow-y: auto;
}
.modal-overlay.open { display: grid; place-items: start center; }
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-md);
  width: 100%; max-width: 720px; margin: 6vh 0; padding: 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; }
.modal-x { background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal-x:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- Model cards ---------- */
.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .model-grid { grid-template-columns: 1fr; } }
.model-card {
  text-align: left; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s, transform .12s;
}
.model-card:hover { border-color: var(--accent); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.model-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.model-card.locked { cursor: not-allowed; opacity: .62; background: var(--surface-2); }
.model-card.locked:hover { transform: none; border-color: var(--border); box-shadow: none; }
.model-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-card-name { font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.lvl-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); }
.lvl-low { background: var(--pos-bg); color: var(--pos); }
.lvl-medium { background: var(--info-bg); color: var(--info); }
.lvl-high { background: var(--warn-bg); color: var(--warn); }
.lvl-very_high { background: var(--neg-bg); color: var(--neg); }
.model-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.model-tags .tag { font-size: 11.5px; color: var(--ink-2); background: var(--surface-3); padding: 2px 8px; border-radius: var(--r-pill); }
.model-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.model-locked-note { font-size: 11.5px; color: var(--warn); }

/* ---------- Onboarding ---------- */
.onboard-tips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.onboard-tips li { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 11px; }
.onboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .onboard-grid { grid-template-columns: 1fr; } }
.onboard-opt { display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 12px 13px; transition: border-color .15s, box-shadow .15s, transform .12s; }
.onboard-opt:hover { border-color: var(--accent); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.onboard-opt .oo-name { flex: 1; font-weight: 700; font-size: 14px; color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 22px; text-align: center;
  color: var(--faint); font-size: 13px; background: var(--surface);
}
.footer .hub { color: var(--accent); font-weight: 600; }
.footer .cantstop { color: inherit; text-decoration: none; cursor: default; }
.footer .cantstop:hover { color: var(--muted); text-decoration: none; }

/* ============================================================
   Mobile refinements (final pass)
   ============================================================ */
@media (max-width: 720px) {
  /* 넓은 표는 카드 안에서 가로 스크롤 */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 520px; }
  .topbar { padding: 11px 16px; }
  .container { padding: 22px 16px 60px; }
}
@media (max-width: 560px) {
  h1 { font-size: 22px; }
  h2 { font-size: 16px; }
  .org-hero-emblem { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
  .org-hero h1 { font-size: 20px; }
  .org-portal-tag { font-size: 12px; }
  .stat .value { font-size: 21px; }
  /* 상단 네비가 길어지면 가로 스크롤로 (줄바꿈 누적 방지) */
  .topbar nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; }
  .topbar nav::-webkit-scrollbar { height: 0; }
  .topbar nav a { padding: 7px 9px; white-space: nowrap; font-size: 13.5px; }
  .topbar nav .muted { display: none; }
  /* 모델 모달 풀폭 */
  .modal { margin: 4vh 0; padding: 18px; }
  .modal-overlay { padding: 12px; }
}
