/* 값은 여기 한 곳에 둔다. 폭 5단계는 조직 RESPONSIVE 그대로다.
   디자인: 관제실 · 별자리(#40). 무채색 바탕에 신호색(--accent) 하나, 식별자는 고정폭, 상태는 LED 점. */
:root {
  color-scheme: light dark;
  --wrap: 100%;
  --gutter: 16px;
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #0f1822;
  --muted: #566372;
  --line: #d3dae2;
  --accent: #0b7d84;
  --accent-ink: #ffffff;
  --accent-2: #3d6fd8; /* 로고 글자 그라데이션에만 쓴다(#117) */
  --ok: #1d8a4a;
  --bad: #b3261e;
  --star: #22303f;
  --grid: rgb(15 24 34 / 5%);
  --term-bg: #070a0e;
  --term-ink: #cfe3e0;
  --term-line: #1a242f;
  --radius: 4px;
  --font: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "D2Coding", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090d12;
    --surface: #0f151c;
    --ink: #d9e2ea;
    --muted: #8593a2;
    --line: #1e2935;
    --accent: #4fd6c8;
    --accent-ink: #04201d;
    --accent-2: #8ab0ff;
    --ok: #4ccf7c;
    --bad: #ff8a80;
    --star: #c9d6e2;
    --grid: rgb(201 214 226 / 3.5%);
  }
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --wrap: 1160px; --gutter: 32px; } }
@media (min-width: 1440px) { :root { --wrap: 1400px; } }
@media (min-width: 1920px) { :root { --wrap: 1760px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  word-break: keep-all;
  overflow-wrap: break-word;
}
p, li, td { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.3; margin: 0; text-wrap: balance; }
main { flex: 1; width: 100%; }
a { color: var(--accent); }
code, pre, .slug, .eyebrow { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.sr { position: absolute; left: -9999px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 8px 12px; z-index: 1; }

/* 상단 */
.top { border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 20; }
.top-row { display: flex; flex-wrap: wrap; align-items: center; min-height: 56px; gap: 0 24px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.logo svg { flex: none; }
.logo-name { display: inline-flex; flex-direction: column; line-height: 1.15; }
.logo-name small { color: var(--muted); font: 500 11px var(--mono); letter-spacing: .02em; }
/* 로고에 마우스 · 키보드 초점이 오면 별자리가 다시 그려지고 이름에 색이 흐른다(#117). 움직임 줄이기면 색만 바뀐다 */
.logo-mark { transition: transform .45s cubic-bezier(.2, .8, .2, 1.2); }
.logo-line { stroke-dasharray: 46; }
.logo-star { transform-box: fill-box; transform-origin: center; }
.logo-title {
  background: linear-gradient(90deg, var(--ink) 0%, var(--accent) 25%, var(--accent-2) 50%, var(--accent) 75%, var(--ink) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text;
}
.logo:hover .logo-mark, .logo:focus-visible .logo-mark { transform: rotate(-10deg) scale(1.12); }
.logo:hover .logo-line, .logo:focus-visible .logo-line { animation: logo-draw .9s ease-out; }
.logo:hover .logo-star, .logo:focus-visible .logo-star { animation: logo-twinkle .7s ease-in-out calc(var(--i) * 120ms) both; }
.logo:hover .logo-lead, .logo:focus-visible .logo-lead { animation: logo-pulse 1.6s ease-in-out infinite; }
.logo:hover .logo-title, .logo:focus-visible .logo-title { color: transparent; animation: logo-flow 2.4s ease-in-out infinite alternate; }
@keyframes logo-draw { from { stroke-dashoffset: 46; } to { stroke-dashoffset: 0; } }
@keyframes logo-twinkle { 50% { transform: scale(1.6); opacity: .6; } }
@keyframes logo-pulse { 50% { transform: scale(1.35); filter: drop-shadow(0 0 3px var(--accent)); } }
@keyframes logo-flow { to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .logo-mark { transition: none; }
  .logo:hover .logo-mark, .logo:focus-visible .logo-mark { transform: none; }
  .logo:hover .logo-line, .logo:hover .logo-star, .logo:hover .logo-lead, .logo:hover .logo-title,
  .logo:focus-visible .logo-line, .logo:focus-visible .logo-star, .logo:focus-visible .logo-lead,
  .logo:focus-visible .logo-title { animation: none; }
  .logo:hover .logo-title, .logo:focus-visible .logo-title { background-position: 50% 0; }
}
.main-nav { display: flex; flex: 1; gap: 4px; min-width: 0; }
.main-nav a { position: relative; padding: 16px 10px; color: var(--muted); font-size: 14px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.nav-sep { flex: none; align-self: center; width: 1px; height: 16px; margin: 0 8px; background: var(--line); }  /* 공통 메뉴 | 로그인 뒤 내 메뉴(#95) */
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.main-nav a[aria-current="page"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@media (max-width: 899px) {
  .top-row { justify-content: space-between; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -10px; overflow-x: auto; }
  .main-nav a { padding: 8px 10px 12px; }
}
.top-nav { display: flex; align-items: center; gap: 12px; font-size: 14px; white-space: nowrap; }
.top-nav a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.top-nav a.btn { color: var(--accent-ink); padding: 7px 14px; }
.top-nav .lang-switch { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.top-nav .lang-switch:hover { color: var(--accent); }
.bp { border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; line-height: 1; padding: 3px 5px; }
.bp::after { content: "S"; }
@media (min-width: 640px) { .bp::after { content: "M"; } }
@media (min-width: 1024px) { .bp::after { content: "L"; } }
@media (min-width: 1440px) { .bp::after { content: "XL"; } }
@media (min-width: 1920px) { .bp::after { content: "2XL"; } }

/* 프로필 메뉴 */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(260px, calc(100vw - 32px)); display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 28px rgb(0 0 0 / 16%); white-space: normal; }
.menu-panel p { margin: 0; }
.menu-panel hr { width: 100%; margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.menu-panel .link { width: 100%; min-height: 36px; padding: 0 8px; text-align: left; color: var(--ink); }
.menu-panel .muted { overflow-wrap: anywhere; }
.menu-name { font-weight: 700; overflow-wrap: anywhere; }
.top-nav .menu-admin, .top-nav .menu-admin:hover { color: var(--accent-ink); }
.menu-admin { margin-top: 4px; padding: 9px 8px; border-radius: var(--radius); background: var(--accent); font-weight: 700; text-align: center; }
.profile-now { gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--line); border-radius: 999px; }
.profile-now .avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.profile-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* 버튼 */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn { display: inline-block; padding: 10px 18px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-small { padding: 7px 14px; font-size: 14px; }
.btn-submit { cursor: pointer; font: inherit; font-weight: 600; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--accent); }
.page a.btn, .page .card a.btn, .page .shared-enter a.btn, .page .shared-enter a.btn:hover { color: var(--accent-ink); }
.page a.btn-quiet, .hero a.btn-quiet { color: var(--ink); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; min-height: 44px; padding: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; color: var(--ink); }
.check input { margin-top: 5px; width: 18px; height: 18px; }
.is-busy { opacity: .6; cursor: progress; }
.danger { color: var(--bad); }

/* 첫 화면 */
.hero { position: relative; isolation: isolate; display: grid; gap: 0 16px; align-items: center; padding: 56px 0 40px; }
.hero::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); z-index: -1; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -0.02em; }
.hero-copy > p { margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.hero .eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 12px; letter-spacing: .06em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.hero-meta a { color: var(--ink); }
.led { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); vertical-align: 1px; }
.hero .store-search { margin-top: 24px; max-width: 560px; padding: 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent); align-items: center; }
.hero .store-search:focus-within { border-color: var(--accent); }
.hero .store-search::before { content: ">"; padding: 0 2px 0 10px; color: var(--accent); font: 700 15px var(--mono); }
.hero .store-search input { border: 0; background: transparent; font-size: 16px; caret-color: var(--accent); }
.hero .store-search input:focus { outline: none; }
@media (min-width: 900px) { .hero.has-sky { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 24px 0; } }
.stage { position: relative; height: 400px; margin: 24px calc(-1 * var(--gutter)) 0; }
@media (min-width: 900px) { .stage { height: 540px; margin: 0 calc(-1 * var(--gutter)) 0 0; } }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; -webkit-mask-image: radial-gradient(ellipse 70% 72% at 52% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 70% 72% at 52% 50%, #000 62%, transparent 100%); }
.hud-path, .hud-tag { position: absolute; top: 16px; margin: 0; color: var(--muted); font: 12px var(--mono); }
.hud-path { left: 16px; right: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hud-path span + span::before { content: " › "; color: var(--muted); }
.hud-path span:last-child { color: var(--accent); }
.hud-tag { right: 16px; }
.hud-log { position: absolute; left: 16px; right: 16px; bottom: 12px; display: grid; margin: 0; padding: 0; list-style: none; color: var(--muted); font: 12px/1.7 var(--mono); }
.hud-log li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .45; }
.hud-log li:last-child { color: var(--ink); opacity: 1; }
.hud-log .k { color: var(--accent); margin-right: 6px; }
.home-block { margin-top: 40px; }
.home-block:last-of-type { margin-bottom: 64px; }
.first { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.first p { margin: 0; }
.home-block a.btn-quiet { color: var(--ink); }
section > h2 { font-size: 20px; }

/* 이용 방법: 신호선으로 이은 네 점 */
.steps { list-style: none; counter-reset: step; position: relative; display: grid; gap: 18px; grid-template-columns: 1fr; margin: 20px 0 0; padding: 0; }
.steps::before { content: ""; position: absolute; left: 7px; top: 7px; bottom: 7px; border-left: 1px dashed var(--accent); opacity: .6; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 0 32px; counter-increment: step; }
.steps li::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); box-sizing: border-box; }
.steps li:last-child::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.steps li strong::before { content: "0" counter(step) " · "; color: var(--accent); font: 12px var(--mono); }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .steps::before { left: 7px; right: 7px; bottom: auto; border-left: 0; border-top: 1px dashed var(--accent); }
  .steps li { padding: 28px 16px 0 0; }
  .steps li::before { top: 0; }
}

/* 카드 · 목록 */
.cards { list-style: none; margin: 16px 0 64px; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 17px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 8px 0 0; color: var(--muted); }
.card > p:first-child { margin-top: 0; }
.server-card { display: flex; flex-direction: column; }
.server-card:hover { border-color: var(--accent); }
.server-card .slug { margin-top: 2px; font-size: 12px; }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.card .card-top { margin: 0 0 8px; }
.card-foot { display: flex; align-items: center; gap: 4px 14px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; }
.card .muted.card-foot { margin-top: auto; padding-top: 10px; }
.server-card .card-foot { margin-top: auto; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tag-demo::before { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.tag-official::before, .tag-passed::before { background: var(--ok); box-shadow: 0 0 5px var(--ok); }
.tag-warn, .tag-changed, .tag-unanswered { border-color: var(--bad); color: var(--bad); }
.tag-warn::before, .tag-changed::before, .tag-unanswered::before { background: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip .count { color: var(--muted); font: 12px var(--mono); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.is-on .count { color: inherit; }
.chip.is-empty:not(.is-on) { opacity: .45; }
.store-search { display: flex; gap: 8px; flex: 1 1 280px; max-width: 420px; }
.store-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.empty { margin-top: 24px; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty .btn { margin-top: 12px; }

/* 쪽 · 상세 */
.page { padding: 32px 0 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head h1, .page-title { font-size: 26px; }
.page .card h2 { font-size: 17px; }
.page .card a { color: var(--ink); text-decoration: none; }
.page .card a:hover { color: var(--accent); }
/* 상세 · 안내 쪽도 다른 화면과 같은 --wrap 폭을 쓴다(#111 · RESPONSIVE.md 「넓은 화면을 좁게 쓰지 않는다」). */
.detail header > p { margin: 8px 0 0; }
.detail .notice { margin-top: 8px; }
.notice { margin: 16px 0 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.notice-bad { border: 1px solid var(--bad); }
.panel { min-width: 0; }
.panel-block { margin-top: 20px; }
.panel-block h2 { font-size: 18px; }
.panel-block h3 { margin-top: 16px; font-size: 15px; }
.panel-block ul { margin: 6px 0 0; padding-left: 20px; }
.panel-block form { margin-top: 16px; }
.panel-block td form { margin-top: 0; }
.source { padding: 0 5px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.text-link { text-decoration: underline; }
#manage form + form { margin-top: 12px; }

/* 체험 · 코드: 터미널처럼 */
.try-form { padding-top: 16px; border-top: 1px solid var(--line); }
.try-form h3 code { color: var(--accent); }
.try-form label, .connect-url { display: block; margin-top: 12px; font-weight: 600; }
.try-form input, .try-form select, .try-form textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 400 15px var(--mono); }
.try-form .btn { margin-top: 12px; }
.try-result { margin-top: 16px; }
.try-result .code { background: var(--term-bg); border-color: var(--term-line); color: var(--term-ink); overflow-wrap: break-word; word-break: keep-all; }
.code { margin: 8px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); font-size: 13px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.code-file { margin-top: 16px; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tutorial { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: tutorial; }
.tutorial > li { counter-increment: tutorial; }
.tutorial > li > .card > h2::before { content: "0" counter(tutorial) " · "; color: var(--accent); font: 14px var(--mono); }
.tutorial .code { white-space: pre; overflow-wrap: normal; }
.tutorial .code-wrap { white-space: pre-wrap; }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.copy-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 14px var(--mono); }
.guide { margin-top: 12px; }
.guide summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.tools { list-style: none; padding: 0; }
.panel-block .tools { padding: 0; }
.tools li { padding: 10px 0; border-top: 1px solid var(--line); }
.tools p { margin: 4px 0 0; }

/* 도움말 */
.panel-block .eyebrow { margin: 0 0 8px; color: var(--accent); font: 600 13px var(--font); }
.panel-block > h2 + p { margin-top: 8px; }
.yes-no { display: grid; gap: 4px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .yes-no { grid-template-columns: 1fr 1fr; } }
.panel-block .guide-cards { margin: 12px 0 0; padding: 0; }
@media (min-width: 640px) { .guide-cards { grid-template-columns: repeat(2, 1fr); } }
.guide-cards .slug { margin: 0 0 4px; color: var(--accent); font-size: 12px; }
.terms { display: grid; grid-template-columns: 1fr; gap: 4px 20px; margin: 12px 0 0; }
@media (min-width: 640px) { .terms { grid-template-columns: max-content 1fr; } }
.terms dt { font-weight: 600; }
.terms dd { margin: 0 0 10px; color: var(--muted); }
@media (min-width: 640px) { .terms dd { margin: 0; } .terms { row-gap: 12px; } }

/* 표 · 관리자 */
.table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-head { margin-top: 32px; font-size: 18px; }
form.inline { display: inline; }
.admin-sub { margin-top: 24px; font-size: 16px; }
.admin-filter { display: grid; gap: 12px; align-items: end; margin-top: 16px; padding: 16px; }
@media (min-width: 900px) { .admin-filter { grid-template-columns: 2fr 1fr 1fr 1fr auto; } }
.admin-filter label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.admin-filter input, .admin-filter select, .admin-bulk input, .admin-bulk select { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 400 14px var(--font); }
.admin-bulk { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.admin-bulk input { flex: 1 1 240px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.limit-form { display: grid; gap: 10px; max-width: 520px; margin-top: 12px; }
.limit-form label { display: grid; gap: 4px; font-size: 14px; }
.limit-form input { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; }
.limit-form .btn { justify-self: start; }
.admin-form { display: flex; gap: 6px; margin-bottom: 6px; min-width: 240px; }
.admin-form input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; }
.stats { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 16px 0 24px; padding: 0; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stats strong { font: 600 26px var(--mono); }

/* 모달 · 바닥 */
.modal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 20px; max-width: min(420px, calc(100vw - 32px)); }
.modal::backdrop { background: rgb(0 0 0 / 40%); }
.modal p { margin: 0 0 16px; }
.modal .actions { justify-content: flex-end; }
.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 13px; }
.foot p { margin: 2px 0; }
.foot a { color: inherit; white-space: nowrap; }
.group-note { margin: 12px 0 0; font-size: 14px; }
.provider-cards .card h3 { margin: 0 0 4px; }
.health-bar { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; margin: 12px 0 8px; padding: 0; list-style: none; }
.health-bar li { height: 28px; border-radius: 2px; }
.h-ok { background: var(--ok); }
.h-login { background: var(--accent); }
.h-down { background: var(--bad); }
.h-none { background: var(--line); }
.health-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.health-legend span { display: inline-flex; align-items: center; gap: 6px; }
.health-legend i { width: 10px; height: 10px; border-radius: 2px; }
.health-spark { display: block; width: 100%; height: 40px; }
.detail-tags { margin-top: 8px; }
.detail-tags .chip { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.tag-pick legend { padding: 0 4px; font-size: 14px; }
.try-form .check { display: flex; margin-top: 0; font-weight: 400; }
.try-form .check input { width: 18px; margin: 3px 0 0; padding: 0; }
.vis-pick { flex-direction: column; gap: 10px; margin-top: 12px; }
.card-foot .today { display: inline-flex; align-items: center; gap: 5px; }
.card-foot .today i { width: 8px; height: 8px; border-radius: 50%; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.recipe h3 { margin: 0 0 4px; }
.recipe-steps { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; counter-reset: step; }
.recipe-steps li { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; counter-increment: step; }
.recipe-steps li::before { content: counter(step); grid-row: span 2; width: 22px; height: 22px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font: 12px/20px var(--mono); text-align: center; }
.recipe-steps a, .recipe-steps span:first-child { font-weight: 600; }
.recipe-steps .muted { font-size: 13px; }
.recipe-prompt { margin: auto 0 0; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--bg); font-size: 14px; }
.recipe-prompt .eyebrow { display: block; margin-bottom: 4px; color: var(--accent); font: 600 12px var(--font); }
.recipe-connect { margin-top: 12px; }
.recipe-connect > summary { cursor: pointer; font-weight: 600; min-height: 32px; color: var(--accent); }
.connect-many .code { white-space: pre; overflow-wrap: normal; }
.recipe { display: flex; flex-direction: column; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* 시험하기 채팅(#67) */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 15px var(--font); cursor: pointer; box-shadow: 0 10px 24px rgb(0 0 0 / 22%); }
.chat-fab[hidden] { display: none; }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 41; width: min(420px, calc(100vw - 40px)); height: min(640px, calc(100vh - 40px)); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 40px rgb(0 0 0 / 24%); overflow: hidden; }
.chat[hidden] { display: none; }
.chat-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-target { display: contents; }
.chat-servers, .chat-tools { grid-column: 1 / -1; }
.chat-actions { grid-column: 2; grid-row: 1; }
.chat-target { min-width: 0; }
.chat-target p { margin: 0; }
.chat-label { font-size: 12px; color: var(--muted); }
.chat-tools { font-size: 12px; margin-top: 4px !important; }
.chat-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.chat-x { width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.chat-msg p { margin: 0; }
.chat-who { font-size: 12px; color: var(--muted); }
.chat-text { white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.chat-user { justify-self: end; max-width: 85%; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.chat-user .chat-who { text-align: right; }
.chat-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; }
.chat-step-head { margin: 0 0 6px; }
.chat-step pre { margin: 6px 0 0; max-height: 220px; overflow: auto; padding: 8px; border-radius: var(--radius); background: var(--term-bg); color: var(--term-ink); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-result summary { cursor: pointer; }
.chat-sys { margin: 0; font-size: 13px; color: var(--muted); }
.chat-sys.is-error { color: var(--bad); }
.chat-cannot { padding: 0 16px 12px; }
.chat-cannot .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-examples { padding: 0 16px 8px; }
.chat-examples p { margin: 0 0 6px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chips .chip { cursor: pointer; font: 13px var(--font); text-align: left; white-space: normal; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px 6px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 15px/1.5 var(--font); }
.chat-form .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 6.5em; }
.chat-note { margin: 0; padding: 0 16px 12px; font-size: 12px; }
.chat-login { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.spin { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.is-busy .spin, .chat-status .spin { display: inline-block; }
.chat-status { display: flex; align-items: center; gap: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .login-join { display: none; }
  .chat-fab { right: 12px; bottom: 12px; }
  .chat { right: 0; bottom: 0; width: 100vw; height: 85vh; border-radius: 12px 12px 0 0; }
}
/* 거르기 줄(#85). 줄마다 아이콘 + 이름을 왼쪽에 두고, 카테고리는 색으로 가른다.
   좁은 폭에서는 줄마다 가로 스크롤로 둬 서버 카드가 첫 화면에 보이게 한다(#54) */
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.c-dev { --c: #2f5fd0; } .c-work { --c: #6b4fc8; } .c-finance { --c: #137a4b; } .c-education { --c: #a65400; }
.c-trade { --c: #b0421f; } .c-shopping { --c: #c0306a; } .c-travel { --c: #08799f; } .c-life { --c: #7d6a00; }
.c-design { --c: #9a35b5; } .c-gov { --c: #4a5a6e; } .c-health { --c: #c02a3a; }
@media (prefers-color-scheme: dark) {
  .c-dev { --c: #86a9ff; } .c-work { --c: #b7a3ff; } .c-finance { --c: #62d39b; } .c-education { --c: #f2a65a; }
  .c-trade { --c: #f39071; } .c-shopping { --c: #ff8ab8; } .c-travel { --c: #5cc9f0; } .c-life { --c: #d9c45c; }
  .c-design { --c: #e08cf5; } .c-gov { --c: #a7b4c4; } .c-health { --c: #ff8a95; }
}
.head-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 14px; }
.head-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.head-links a:hover { color: var(--accent); }
.filters { display: grid; margin-top: 16px; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px 0; }
.filter-row + .filter-row { border-top: 1px dashed var(--line); }
.filter-label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.filter-row .chips { flex-wrap: nowrap; gap: 6px; margin: 0; overflow-x: auto; scrollbar-width: none; }
.filter-row .chips { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.filter-row .chip { gap: 6px; min-height: 32px; padding: 4px 10px; background: var(--bg); border-color: transparent; }
.filter-row .chip:hover { border-color: var(--accent); }
.filter-row .chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cat-chip .icon { color: var(--c); }
.chip.cat-chip:hover { border-color: var(--c); }
.chip.cat-chip.is-on { background: var(--c); border-color: var(--c); color: var(--surface); }
.chip.cat-chip.is-on .icon { color: inherit; }
.tag-chips .chip { min-height: 28px; padding: 2px 9px; color: var(--muted); font-size: 13px; }
.tag-chips .chip.is-on { color: var(--accent-ink); }
.more-chip { cursor: pointer; border-style: dashed; color: var(--accent); }
.filter-row .more-chip { border-color: var(--line); background: transparent; color: var(--accent); }
.more-toggle:not(:checked) ~ .is-extra, .more-toggle:not(:checked) ~ .more-chip .when-open, .more-toggle:checked ~ .more-chip .when-closed { display: none; }
.more-toggle:focus-visible ~ .more-chip { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 640px) {
  .filters { padding: 4px 16px; }
  .filter-row { grid-template-columns: 104px minmax(0, 1fr); }
  .filter-row .chips { flex-wrap: wrap; overflow-x: visible; mask-image: none; }
}
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 16px; }
.picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.picked-label { color: var(--muted); }
.picked-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px 3px 9px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); text-decoration: none; }
.picked-chip:hover { background: var(--accent); color: var(--accent-ink); }
.picked-chip .icon:last-of-type { width: 14px; height: 14px; }
.picked-reset { color: var(--muted); }
.sort { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sort a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 11px; color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.sort a + a { border-left: 1px solid var(--line); }
.sort a:hover { color: var(--ink); }
.sort a.is-on { background: var(--accent); color: var(--accent-ink); }
.cat-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); font-size: 12px; font-weight: 600; white-space: nowrap; }
.cat-badge .icon { width: 14px; height: 14px; }
.region-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.region-badge .icon { width: 13px; height: 13px; }
/* 사용법(#89). 상세 · 구독 화면의 시작 순서와 예시 문장, 카드의 예시 한 줄 */
.usage { border-color: var(--accent); }
.usage-can { margin: 0; padding-left: 20px; }
.usage-asks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.usage-asks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); }
.usage-asks li span::before { content: "“"; color: var(--accent); }
.usage-asks li span::after { content: "”"; color: var(--accent); }
.usage-asks .btn { flex: none; }
.usage-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.usage-steps li { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; counter-increment: step; }
.usage-steps li::before { content: counter(step); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 12px/24px var(--mono); text-align: center; }
.usage-steps .muted { font-size: 14px; }
.card-ask { display: block; margin: 0 0 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--bg); color: var(--ink); font-size: 14px; text-decoration: none; }
.card-ask span { display: inline-block; margin-right: 6px; color: var(--accent); font-size: 12px; font-weight: 600; }
.card-ask:hover { color: var(--accent); }
/* 채팅의 MCP 배지(#91). 서버마다 색 하나를 정해 배지 · 호출 · 응답 · 「답에 쓴 MCP」를 같은 색으로 칠한다 */
.srv-0 { --srv: #2f5fd0; } .srv-1 { --srv: #b0421f; } .srv-2 { --srv: #137a4b; }
.srv-3 { --srv: #9a35b5; } .srv-4 { --srv: #a65400; } .srv-5 { --srv: #08799f; } .srv-off { --srv: var(--muted); }
@media (prefers-color-scheme: dark) {
  .srv-0 { --srv: #86a9ff; } .srv-1 { --srv: #f39071; } .srv-2 { --srv: #62d39b; }
  .srv-3 { --srv: #e08cf5; } .srv-4 { --srv: #f2a65a; } .srv-5 { --srv: #5cc9f0; }
}
.srv { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border: 1px solid color-mix(in srgb, var(--srv) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--srv) 12%, var(--surface)); color: var(--srv); font-size: 13px; font-weight: 600; white-space: nowrap; }
.srv .icon { width: 14px; height: 14px; }
.chat-servers { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.chat-server { display: inline-flex; align-items: center; gap: 4px; }
.chat-server small { color: var(--muted); font-size: 11px; }
.chat-server.is-off .srv { border-style: dashed; background: transparent; font-weight: 500; }
.chat-server.is-talking .srv { background: var(--srv); color: var(--surface); animation: srv-talk 1s ease-in-out infinite; }
@keyframes srv-talk { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--srv) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .chat-server.is-talking .srv { animation: none; } }
.chat-step.chat-call, .chat-step.chat-result { border-left: 3px solid var(--srv); }
.chat-step-head, .chat-result summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.chat-step-head .icon, .chat-result summary .icon { width: 14px; height: 14px; color: var(--srv); }
.chat-step-head strong, .chat-result summary strong { color: var(--srv); }
.chat-result.is-error { border-left-color: var(--bad); }
.chat-used { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 0; font-size: 12px; }
.chat-used .srv { font-size: 12px; padding: 1px 8px 1px 6px; }
.chat-result summary { cursor: pointer; list-style: none; }
.chat-result summary::-webkit-details-marker { display: none; }
.chat-result summary::before { content: "▸"; color: var(--muted); }
.chat-result[open] summary::before { content: "▾"; }
/* 개발용 로그인(#93). 사내망 스테이징 · 로컬에서만 보인다 */
.dev-login { display: grid; gap: 10px; max-width: 420px; margin-top: 24px; padding: 20px; border-style: dashed; }
.dev-login h2 { margin: 0; font-size: 18px; }
.dev-login p { margin: 0; }
.dev-login label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.dev-login input { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.dev-login .btn { justify-self: start; }
/* 서버 목록 배경의 별자리 장식(#97). 카드 안에는 장식 그래프를 두지 않는다(상태값으로 오해된다) */
.servers-page { position: relative; isolation: isolate; }
.page-sky { position: absolute; z-index: -1; top: -24px; left: 0; width: 100%; height: 300px; pointer-events: none; mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.sky-lines polyline { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .16; }
.sky-stars circle { fill: var(--muted); opacity: .35; }
.sky-stars circle.lit { fill: var(--accent); opacity: .5; }
