/*
 * COSMOS 대시보드. 디자인 기준은 바탕화면 "AI 디자인 가이드".
 *   - 무채색(중립 회색)만. 유채색은 상태 표시(빨간 점)에만
 *   - 조작부 3단: 필터(움푹한 홈 + 고른 것만 반전) / 콘텐츠(테두리 없는 줄) / 액션(얇은 테두리 버튼)
 *   - 모서리는 한 값(--r), 조작부 높이 44px 이상, 글꼴은 기기 기본
 *   - 어두운 모드가 기본(서버·봇 그림이 검은 우주). 기기가 밝은 모드면 밝게
 */
:root {
  --bg: #09090b;
  --surface: #18181b;
  --line: #27272a;
  --line-strong: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --sel-bg: #fafafa;
  --sel-fg: #09090b;
  --status: #ef4444;
  --r: 6px;
  --h: 44px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f4f4f5;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --text: #18181b;
    --muted: #71717a;
    --sel-bg: #18181b;
    --sel-fg: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
/* hidden 은 언제나 숨긴다(.button 의 display 가 덮어쓰지 못하게) */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
/* 스크롤바가 생겨도 본문이 옆으로 밀리지 않게 자리를 늘 비워 둔다 */
html { scrollbar-gutter: stable; }
body {
  /* 한글 글꼴을 앞에 둔다. 영문 글꼴(Segoe UI)이 앞이면 한 줄 안에서 영문·숫자와 한글이 서로 다른 글꼴로 섞여 보인다 */
  font: 15px/1.6 "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  /* 한글 낱말 중간에서 줄을 바꾸지 않는다. 긴 ID 처럼 끊을 곳이 없는 것만 아무 데서나 */
  word-break: keep-all; overflow-wrap: anywhere;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--text); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 8px; }
.head h2 { margin: 0; }
h3 { font-size: 14px; margin: 20px 0 4px; color: var(--muted); font-weight: 600; }
p { margin: 8px 0; }
code { background: var(--surface); padding: 1px 6px; border-radius: var(--r); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── 머리줄 ─────────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; gap: 24px; min-height: 56px;
  padding: 0 max(24px, calc((100% - 960px) / 2 + 24px));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; letter-spacing: .06em; }
.brand img { border-radius: 50%; }
/* 음악 화면 로고와 같은 바탕 없는 토성(글자색을 따른다) */
.brand .mark { flex: none; width: 26px; height: 26px; color: var(--text); }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: var(--muted); text-decoration: none; padding: 0 10px; min-height: var(--h); display: inline-flex; align-items: center; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav a.on { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--text); }
.user { display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-block; background: var(--line); }

main { width: 100%; max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; flex: 1; }
footer { display: flex; gap: 8px; justify-content: center; padding: 24px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
footer a { color: var(--muted); }

/* ── 구역: 상자 없이 제목과 여백으로 나눈다 ────────────────────────────── */
.card { padding: 28px 0; border-top: 1px solid var(--line); }
section > .card:first-child, .card:first-child { border-top: 0; padding-top: 8px; }
.card.narrow { max-width: 720px; margin: 0; border: 0; }
.head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.head h2 { flex: 1; }

/* 한 번 보면 되는 설명은 ? 로 숨긴다 */
details.help { position: relative; }
details.help > summary {
  list-style: none; cursor: pointer; width: var(--h); height: var(--h);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--muted);
}
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary:hover { border-color: var(--text); color: var(--text); }
details.help[open] > summary { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
details.help > div {
  position: absolute; right: 0; top: calc(var(--h) + 6px); z-index: 5; width: min(360px, 80vw);
  /* 본문 위에 떠 있는 것이 보이게 한 단 밝은(어두운 모드면 한 단 밝은) 판과 그림자. 글은 조금 작게, 줄 간격은 넉넉히 */
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 14px 16px; color: var(--text);
  font-size: 14px; line-height: 1.75; box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

/* ── 상태: 유채색은 여기에만 ─────────────────────────────────────────────── */
.notice { border-left: 2px solid var(--text); padding: 8px 14px; background: var(--surface); border-radius: var(--r); }
.lock::before, .status.failed::before, .status.unknown::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--status); margin-right: 8px; vertical-align: middle;
}
.status { font-size: 13px; color: var(--muted); }
.status.done { color: var(--text); }

/* ── 1단 필터: 움푹한 홈, 고른 것만 반전 ───────────────────────────────── */
.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 16px 0 8px;
  background: var(--surface); border-radius: var(--r);
}
.tabs a {
  min-height: calc(var(--h) - 8px); padding: 0 16px; display: inline-flex; align-items: center;
  color: var(--muted); text-decoration: none; border-radius: var(--r);
}
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--sel-bg); color: var(--sel-fg); font-weight: 600; }

/* ── 2단 콘텐츠: 테두리 없는 줄 ─────────────────────────────────────────── */
.servers { list-style: none; padding: 0; margin: 12px 0; }
.servers a {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 12px; text-decoration: none; border-radius: var(--r);
}
.servers a:hover { background: var(--surface); }
.servers .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gicon { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.gicon.blank { display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); font-weight: 700; }
.gtitle { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
.gtitle h1 { margin: 0; }
.tag { font-size: 12px; color: var(--muted); }

table.list { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list td:last-child { text-align: right; white-space: nowrap; }
/* 표의 양 끝을 제목·버튼과 같은 선에 맞춘다 */
table.list td:first-child { padding-left: 0; }
table.list td:last-child { padding-right: 0; }
td.wrap { word-break: break-word; }
/* 한 칸뿐인 줄(용어집 펼치기)은 첫 칸이자 마지막 칸이라 위의 nowrap 이 붙어 PC 에서 옆으로 넘쳤다 */
table.list td.wrap { white-space: normal; }
.prose table.list td:last-child { text-align: left; white-space: normal; }
.prose table.list td:first-child { width: 38%; font-weight: 600; }
.prose ul { padding-left: 20px; }
.prose h2 { margin-top: 24px; }
/* 도움말·약관처럼 긴 글: 한 줄을 짧게(한글 40자 남짓), 줄 간격·문단 사이를 넉넉히, 질문(제목)과 답 사이를 붙이고 다음 질문과는 띄운다 */
.prose { max-width: 640px; }
.prose p, .prose li { line-height: 1.8; }
/* 글마다 구분: 질문(제목) 위에 점선과 관측 번호(01·02…). 첫 글은 제목 바로 아래라 선을 긋지 않는다 */
.prose { counter-reset: q; }
.prose h2 { counter-increment: q; margin: 28px 0 6px; padding-top: 24px; border-top: 1px dashed var(--line-strong); font-size: 17px; line-height: 1.4; }
.prose h1 + h2 { margin-top: 20px; padding-top: 0; border-top: 0; }
.prose h2::before { content: counter(q, decimal-leading-zero); margin-right: 10px; font: 400 13px var(--mono); color: var(--muted); }
.prose h2 + p { margin-top: 0; }
.prose p + p { margin-top: 12px; }

/* 첫 화면 봇 소개 */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 26px; }
.bots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.bot { display: flex; gap: 14px; align-items: center; }
/* 봇 소개 칸은 구역(.card)이 아니다. 구역 구분선·여백이 붙지 않게 */
.bots .card { border-top: 0; padding: 0; margin: 0; }
.bot img { border-radius: 50%; flex: none; width: 56px; height: 56px; }
.bot h2 { letter-spacing: .06em; }
.bot p { margin: 2px 0 0; }

/* ── 입력 ────────────────────────────────────────────────────────────────── */
form label { display: block; margin: 14px 0 6px; color: var(--muted); }
form label.check { color: var(--text); display: flex; align-items: center; gap: 10px; min-height: var(--h); margin: 0; }
select, input[type=number], input[type=text], textarea {
  display: block; width: 100%; max-width: 380px; margin-top: 6px; min-height: var(--h); padding: 8px 12px; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
}
textarea { max-width: none; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--text); }
select:disabled, input:disabled { opacity: .5; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 16px; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 8px 0 4px; margin: 16px 0 0; }
legend { color: var(--muted); padding: 0 8px 0 0; font-size: 13px; }

/* ── 3단 액션: 배경 없는 얇은 테두리 버튼 ───────────────────────────────── */
.button, button.button, form .button, details:not(.help) > summary, button.link.danger {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--h); padding: 0 16px;
  background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r);
  font: inherit; text-decoration: none; cursor: pointer;
}
.button:hover, details:not(.help) > summary:hover, button.link.danger:hover { border-color: var(--text); }
form .button { margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.actions .button { margin-top: 0; }
details:not(.help) { margin-top: 12px; }
details:not(.help) > summary { list-style: none; }
details:not(.help) > summary::-webkit-details-marker { display: none; }
details:not(.help)[open] > summary { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0 8px; min-height: var(--h); }
button.link:hover { color: var(--text); }
button.link.danger { color: var(--muted); padding: 0 14px; }
a.link { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--h); }
a.link:hover { color: var(--text); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row h1, .row h2 { margin: 0; }

/* 휴대폰: 눌러지고 읽히게만 */
@media (max-width: 640px) {
  .top { padding: 0 14px; gap: 8px; flex-wrap: wrap; }
  .user span { display: none; }
  .brand span { display: none; }
  .top nav a { padding: 0 6px; }
  main { padding: 20px 14px 48px; }
  table.list td:last-child { white-space: normal; }
}

/* 요청 폼: 칸과 버튼을 한 덩어리로 */
.rowform { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.card form + form { border-top: 1px dashed var(--line); margin-top: 20px; padding-top: 4px; }

/* 저장 안 한 변경(스크립트가 붙인다) */
/* 바꾼 구역은 그 구역 저장 버튼 앞에 빨간 점(한쪽 굵은 색 테두리는 쓰지 않는다) */
form.track.dirty > .button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--status); margin-right: 8px; }
.savebar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; max-width: calc(100vw - 24px);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.savebar .button { white-space: nowrap; flex: none; }
.savebar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.savebar-text::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--status); margin-right: 8px; vertical-align: middle; }
.button.primary { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.select-filter { display: block; width: 100%; max-width: 380px; margin-top: 6px; min-height: 36px; padding: 6px 12px; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* 저장 뒤 안내: 누른 버튼이 반전돼 "저장됨"이 되고 옆에 시각과 안내가 붙는다(app.js markSaved).
 * 떠 있는 상자는 내용을 가리고 누른 곳과 멀어서 쓰지 않는다. 값을 다시 바꾸면 원래 버튼으로 돌아간다 */
.button.saved { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.button.saved::before {
  content: ""; width: 12px; height: 12px; margin-right: 8px; background: currentColor;
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
}
.savednote { display: inline-flex; align-items: center; gap: 8px; min-height: var(--h); margin: 18px 0 0 12px; vertical-align: top; color: var(--muted); }
.savednote .t { font-family: var(--mono); color: var(--text); }
.actions .savednote { margin: 0 0 0 4px; }
/* 스크립트가 없거나 누른 버튼을 못 찾았을 때만 남는 안내. 위에 한 줄로 둔다(가리지 않게) */
.notice.flash { border: 0; background: none; padding: 0; margin: 0 0 16px; }

/* ═══════════════════════════════════════════════════════════════════════
 * 3차 시안: 성도(별자리 지도)·관측 기록지
 *   기본 회색 화면(흔한 AI 기본값)에서 벗어나 서버·봇 그림의 우주 컨셉을 가져온다.
 *   쓰기 편함 규칙(3단 위계, 44px, 시작선, 상태만 빨강)은 그대로 둔다.
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* 고정폭은 숫자에만 쓴다. 한글이 섞여도 옛 글꼴(굴림체)로 빠지지 않게 한글 글꼴을 뒤에 둔다 */
  /* ui-monospace·Menlo 는 한글 글꼴보다 앞에 둘 것. 뒤에 두면 아이폰·맥에서 Apple SD Gothic Neo 가 영문·숫자까지 그려 모노가 아니게 된다 */
  --mono: "Cascadia Mono", Consolas, ui-monospace, Menlo, "D2Coding", "Malgun Gothic", "Apple SD Gothic Neo", monospace;
  /* 네 갈래 별(봇 아바타와 같은 모양) */
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10Q2.2-2.2 10 0Q2.2 2.2 0 10Q-2.2 2.2-10 0Q-2.2-2.2 0-10Z'/%3E%3C/svg%3E");
}
body { font-variant-numeric: tabular-nums; }
.idx { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* 머리줄: 옅은 별 */
.top {
  background-image:
    radial-gradient(1px 1px at 18% 30%, color-mix(in srgb, var(--text) 45%, transparent) 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 70%, color-mix(in srgb, var(--text) 30%, transparent) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 25%, color-mix(in srgb, var(--text) 40%, transparent) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 60%, color-mix(in srgb, var(--text) 25%, transparent) 50%, transparent 51%);
}

/* 구역: 점선 + 시작점의 별 표식 + 관측 번호 */
main { counter-reset: sec; }
.card { border-top: 1px dashed var(--line-strong); position: relative; }
.card::before {
  content: ""; position: absolute; left: 0; top: -7px; width: 13px; height: 13px; background: var(--text);
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
}
.card:first-child::before, .card.narrow::before, .bots .card::before { display: none; }
.rail-body .card, main > section > .card { counter-increment: sec; }
.rail-body .card > h2::before, .rail-body .card > .head > h2::before,
main > section > .card > h2::before, main > section > .card > .head > h2::before {
  content: counter(sec, decimal-leading-zero); font-family: var(--mono); font-size: 13px; font-weight: 400;
  color: var(--muted); margin-right: 12px;
}
.rail-body .card:first-child { border-top: 0; padding-top: 4px; }

/* 서버 화면: 왼쪽 목차 */
.server .gtitle { margin-bottom: 20px; }
.with-rail { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 0 40px; align-items: start; }
.rail { position: sticky; top: 16px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.rail a {
  display: flex; align-items: center; gap: 12px; min-height: var(--h); padding: 0 12px 0 22px; position: relative;
  color: var(--muted); text-decoration: none;
}
.rail a:hover { color: var(--text); }
.rail a.on { color: var(--text); font-weight: 600; }
.rail a.on::before {
  content: ""; position: absolute; left: -8px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; background: var(--text);
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
}
.rail a.on .idx { color: var(--text); }

/* 서버 목록: 관측 번호 */
.servers a { gap: 16px; }
.servers .idx { width: 20px; flex: none; }

/* 첫 화면: 행성 표식과 옅은 별 */
.hero { position: relative; }
.hero-mark { display: block; margin-bottom: 16px; border-radius: 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 50%; height: 100%; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 15%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 55%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 75%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 20%, var(--text) 50%, transparent 51%);
  opacity: .6;
}
.bots .card { counter-increment: none; }

@media (max-width: 760px) {
  .with-rail { display: block; }
  .rail { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px;
    scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail a { padding: 0 12px; white-space: nowrap; }
  .rail a.on::before { left: 50%; top: auto; bottom: -8px; margin: 0 0 0 -7.5px; }
}

/* 4차: 맡은 봇 표식(봇 아바타와 같은 그림) */
.botmark { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.head h2 .botmark { margin-left: 10px; vertical-align: -6px; }
.rail a .botmark { margin-left: auto; opacity: .7; }
.rail a.on .botmark { opacity: 1; }
.servers .marks { display: inline-flex; gap: 10px; margin-right: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
 * 5차 시안(과감하게): 우주 장면, 관측 카드, 별자리 목차, 별 체크박스
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* 초승달(COSMOS 아바타와 같은 모양) */
  --crescent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cmask id='m'%3E%3Crect width='20' height='20' fill='white'/%3E%3Ccircle cx='13' cy='7' r='7.5' fill='black'/%3E%3C/mask%3E%3Ccircle cx='9' cy='11' r='8' mask='url(%23m)'/%3E%3C/svg%3E");
}

/* 1. 첫 화면: 글은 왼쪽, 고리 행성과 도는 달은 오른쪽 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: center; padding-top: 32px; }
.hero::after { width: 100%; }
.hero-mark { display: none; }
.orbit { position: relative; width: 400px; height: 260px; }
.orbit svg { position: absolute; inset: 0; z-index: 2; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--text); stroke-width: 9; }
.orbit .ring-gap { fill: none; stroke: var(--bg); stroke-width: 21; }
.orbit .planet { fill: var(--text); }
.orbit .planet-gap { fill: var(--bg); }
.orbit .moon {
  /* 달 둘레에 바탕색 틈을 둔다(서버 아이콘의 고리·행성 사이 틈과 같다). 흰 행성 앞을 지나도 묻히지 않는다 */
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: var(--bg); z-index: 3;
  offset-path: path("M 366.4 75.9 A 175 50 -18 1 1 33.6 184.1 A 175 50 -18 1 1 366.4 75.9"); offset-rotate: 0deg;
  animation: orbit 24s linear infinite;
}
/* 앞쪽 반 바퀴는 행성 앞, 뒤쪽 반 바퀴는 행성 뒤 */
@keyframes orbit {
  0% { offset-distance: 0%; z-index: 3; }
  49.9% { z-index: 3; }
  50% { z-index: 1; }
  100% { offset-distance: 100%; z-index: 1; }
}
.orbit .crescent {
  position: absolute; inset: 6px; background: var(--text);
  -webkit-mask: var(--crescent) center / contain no-repeat; mask: var(--crescent) center / contain no-repeat;
}
/* 움직임을 꺼 둔 기기: 행성과 겹치지 않는 오른쪽 위에 멈춘다 */
@media (prefers-reduced-motion: reduce) { .orbit .moon { animation: none; offset-distance: 4%; } }

/* 2. 서버 화면 머리: 관측 카드(별 띠 + 서버 정보 한 줄) */
.gband {
  margin: 12px 0 24px; padding: 20px 0 16px; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong);
  background-image:
    radial-gradient(1.5px 1.5px at 72% 28%, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 70%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 22%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 64%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 97% 55%, var(--text) 50%, transparent 51%);
}
.gband .gtitle { margin: 0; }
.server .gband .gtitle { margin-bottom: 0; }
.gmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.gmeta .num { font-family: var(--mono); }
.gmeta > span + span::before { content: "·"; margin-right: 18px; color: var(--line-strong); }

/* 3. 목차를 별자리로: 항목마다 작은 별(점), 지금 위치는 네 갈래 별 */
.rail a::before {
  content: ""; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--muted);
}
.rail a.on::before { border-radius: 0; }
/* 지금 자리 ✦ 는 목차마다 하나(nav.tsx StarTrail)가 고른 항목으로 미끄러져 옮겨 간다. 항목 자체의 ✦ 는 감춘다 */
.rail a.on::before { visibility: hidden; }
.star-trail { position: absolute; left: -7.5px; top: -7.5px; z-index: 2; width: 15px; height: 15px; pointer-events: none; }
.star-trail.go { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.star-trail b { display: block; width: 100%; height: 100%; background: var(--text);
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat; }
@media (prefers-reduced-motion: no-preference) { .star-trail b { animation: trail-spin 18s linear infinite; } }
@keyframes trail-spin { to { transform: rotate(360deg); } }

/* 4. 체크박스: 켜지면 네 갈래 별 */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  display: inline-grid; place-content: center; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg);
}
input[type=checkbox]::before {
  content: ""; width: 12px; height: 12px; background: var(--sel-fg); transform: scale(0); transition: transform .12s;
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
}
input[type=checkbox]:checked { background: var(--sel-bg); border-color: var(--sel-bg); }
input[type=checkbox]:checked::before { transform: scale(1); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
input[type=checkbox]:disabled { cursor: default; }

@media (max-width: 760px) {
  /* 1fr 은 궤도 그림의 원래 폭(400px) 아래로 안 줄어 화면 밖으로 밀린다 */
  .hero { grid-template-columns: minmax(0, 1fr); }
  .orbit { transform: scale(.8); transform-origin: left top; height: 210px; }
  /* 좁으면 줄이 꺾여 점이 줄 머리에 남는다. 한 줄에 하나씩 */
  .gmeta { flex-direction: column; gap: 2px; }
  .gmeta > span + span::before { content: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * 6차 시안: 움직임
 *   모두 서버 컨셉(우주)에서 가져온다: 별이 반짝이고, 유성이 지나고, 펄사가 맥동하고, 별자리가 하나씩 켜진다.
 *   움직임을 꺼 둔 기기(prefers-reduced-motion)에서는 아무것도 움직이지 않는다. 움직임이 없어도 화면은 그대로다.
 *   transform·opacity 만 움직인다(레이아웃을 다시 계산하지 않게).
 * ═══════════════════════════════════════════════════════════════════════ */

/* 움직임과 상관없는 바탕: 별 한 겹 더, 유성·맥동 자리, 알림 별 */
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 100%; height: 100%; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 68% 12%, var(--text) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 82%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 88%, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 97% 40%, var(--muted) 50%, transparent 51%);
}
.gband { position: relative; }
.gband::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image:
    radial-gradient(1px 1px at 78% 45%, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 85%, var(--text) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 18%, var(--muted) 50%, transparent 51%);
}
.orbit .meteor {
  position: absolute; left: 340px; top: 14px; width: 90px; height: 1.5px; z-index: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--text)); border-radius: 1px;
  transform-origin: 0 50%; transform: rotate(155deg);
}
.botav { position: relative; flex: none; display: inline-flex; border-radius: 50%; }
.botav::before, .botav::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--text); opacity: 0; pointer-events: none; }
.notice.flash::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; background: var(--text);
  -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
}
/* 서버 목록: 가리키면 아이콘 둘레에 궤도 고리 */
.servers a:hover .gicon { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  /* 1. 별 반짝임: 두 겹이 엇갈려 깜빡인다 */
  .hero::after { animation: twinkle 5s ease-in-out infinite alternate; }
  .hero::before { animation: twinkle 3.6s ease-in-out -1.8s infinite alternate; }
  .gband::after { animation: twinkle 4.2s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: .15; } to { opacity: .85; } }

  /* 2. 유성: 11초에 한 번, 행성 뒤로 지나간다 */
  .orbit .meteor { animation: meteor 11s ease-in 3s infinite; }
  @keyframes meteor {
    0% { opacity: 0; transform: rotate(155deg) translateX(0); }
    1% { opacity: 1; }
    8% { opacity: 0; transform: rotate(155deg) translateX(230px); }
    100% { opacity: 0; transform: rotate(155deg) translateX(230px); }
  }

  /* 3. 행성이 천천히 떠 있다(달과 함께). transform 은 휴대폰 축소가 쓰므로 translate 로 */
  .orbit { animation: float 7s ease-in-out infinite alternate; }
  @keyframes float { from { translate: 0 -4px; } to { translate: 0 4px; } }

  /* 4. PULSAR: 펄사처럼 일정한 간격으로 고리를 내보낸다 */
  .bot-pulsar .botav::before, .bot-pulsar .botav::after { animation: pulse 2.6s ease-out infinite; }
  .bot-pulsar .botav::after { animation-delay: 1.3s; }
  @keyframes pulse { 0% { opacity: .6; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.5); } }

  /* 5. 들어올 때: 구역이 차례로 떠오르고, 구역 별이 켜진다.
     backwards 로만 채운다. 끝난 뒤 transform 이 남으면 구역마다 쌓임 맥락이 생겨 ? 설명창이 다음 구역에 가려진다 */
  .rail-body .card, main > section > .card, .bots .card, .servers li, .gband { animation: rise .42s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) backwards; }
  .card::before { animation: spark-on .6s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .12s) backwards; }
  :is(.rail-body, main > section) > .card:nth-child(2), .servers li:nth-child(2), .bots .card:nth-child(2) { --d: .06s; }
  :is(.rail-body, main > section) > .card:nth-child(3), .servers li:nth-child(3) { --d: .12s; }
  :is(.rail-body, main > section) > .card:nth-child(4), .servers li:nth-child(4) { --d: .18s; }
  :is(.rail-body, main > section) > .card:nth-child(n+5), .servers li:nth-child(n+5) { --d: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes spark-on { from { opacity: 0; transform: scale(0) rotate(-90deg); } }

  /* 6. 목차 별자리: 점이 위에서부터 하나씩 켜지고, 지금 자리의 별은 천천히 돈다 */
  /* 고를 때마다 별이 튀어나왔다 들어가는 것이 거슬린다는 의견(11-14)으로 켜짐 효과는 뺐다. 지금 자리 ✦ 만 천천히 돈다 */
  .rail a::before { transition: transform .15s, background-color .15s; }
  .rail a:not(.on):hover::before { transform: scale(1.8); background: var(--text); }
  .rail a.on::before { animation: spin 18s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* 7. 체크박스 별: 돌면서 켜진다 */
  input[type=checkbox]::before { transform: scale(0) rotate(-120deg); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
  input[type=checkbox]:checked::before { transform: scale(1) rotate(0); }
  input[type=checkbox] { transition: background-color .15s, border-color .15s; }

  /* 8. 서버 목록 궤도 고리가 부드럽게 */
  .servers .gicon { transition: box-shadow .2s ease-out; }

  /* 9. 저장 막대가 아래에서 올라온다. 저장 표시의 별은 한 바퀴 돌며 켜진다 */
  .savebar:not([hidden]) { animation: bar-in .25s ease-out; }
  @keyframes bar-in { from { opacity: 0; transform: translate(-50%, 14px); } }
  .notice.flash::before, .button.saved::before { animation: spark-on .7s cubic-bezier(.34, 1.56, .64, 1) .1s backwards; }
  .savednote { animation: drop .2s ease-out; }

  /* 10. 펼침: ? 설명창과 추가 폼이 살짝 내려오며 나타난다. 누르면 버튼이 눌린다 */
  details.help[open] > div { animation: drop .16s ease-out; }
  details:not(.help)[open] > :not(summary) { animation: drop .2s ease-out; }
  @keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
  .button:active, details > summary:active { transform: translateY(1px); }
  .button, details > summary { transition: border-color .15s, background-color .15s; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * 9. 쪽 넘김: 사이트 안에서 쪽을 옮길 때 새로고침처럼 번쩍이지 않고 이어지게(브라우저 view transition, 스크립트 없음)
 *   머리줄·서버 관측 띠·왼쪽 목차는 제자리에 두고, 본문만 바뀐다. 지원하지 않는 브라우저는 그냥 쪽을 연다.
 *   움직임을 꺼 둔 기기에서도 짧게 겹쳐 바뀌기(투명도만)는 한다. 위치가 움직이는 것은 움직임을 켠 기기에서만.
 * ═══════════════════════════════════════════════════════════════════════ */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
.gband { view-transition-name: gband; }
.rail { view-transition-name: rail; }
/* "← 서버 목록"도 서버 안에서 탭을 옮길 때는 제자리에 둔다 */
.backrow { view-transition-name: backrow; }
::view-transition-group(*) { animation-duration: .16s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }
/* 같은 화면에서 넘어왔으면 처음 들어올 때 움직임은 건너뛴다(vt.js 가 붙임) */
:root.vt :is(.rail-body .card, main > section > .card, .bots .card, .servers li, .gband, .card::before, .rail a::before) { animation: none; }
:root.vt .rail a.on::before { animation: spin 18s linear infinite; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .08s ease-in both; }
  ::view-transition-new(root) { animation: vt-in .16s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
}

/* 공개 쪽 피드백(11-11) */
/* 작은 것 2: 머리줄 양 끝의 1px 별은 넓은 PC 화면 가장자리에서 먼지처럼 보여 뺀다(별은 첫 화면·관측 띠에만) */
.top { background-image: none; }
/* 1. 꽉 찬 버튼은 가리켜도 반전 색을 지킨다 */
.button.primary:hover { border-color: var(--sel-bg); opacity: .88; }

/* ═══════════════════════════════════════════════════════════════════════
 * 10. 쪽 넘김(app.js) 중 응답이 0.06초보다 늦으면 머리줄 아래로 가는 빛줄기가 흐른다
 * ═══════════════════════════════════════════════════════════════════════ */
.top { position: relative; }
:root.loading { cursor: progress; }
:root.loading .top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--text), transparent) no-repeat; background-size: 40% 100%; background-position: 50% 0;
}
@media (prefers-reduced-motion: no-preference) {
  :root.loading .top::after { animation: nav-load 1s linear infinite; }
  @keyframes nav-load { from { background-position: -70% 0; } to { background-position: 170% 0; } }
}
/* 쪽을 갈아 끼우면 본문으로 초점을 옮긴다(화면 읽기용). 테두리는 그리지 않는다 */
main:focus { outline: none; }

/* ═══════════════════════════════════════════════════════════════════════
 * 11. 휴대폰(11-14): "PC 에서 열어 주세요" 안내를 없애고 휴대폰에서도 그대로 쓰게
 * ═══════════════════════════════════════════════════════════════════════ */
/* 아래 재생 막대(바닥 18px, 높이 56px)가 바닥글과 마지막 저장 버튼을 가리지 않게 */
body:has(.mp .player) footer { padding-bottom: calc(24px + 74px + env(safe-area-inset-bottom)); }
/* 저장 막대는 재생 막대 위에 띄운다 */
body:has(.mp .player) .savebar { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  /* iOS 는 16px 보다 작은 입력칸을 누르면 화면을 확대한다 */
  select, input[type=number], input[type=text], textarea { font-size: 16px; }
  /* 세 칸 표(내 요청·역할 배율): 이름과 상태·버튼을 한 줄에, 내용은 아래 줄 전체에. 좁은 칸에 한두 글자씩 꺾이지 않게 */
  table.list tr:has(> td:nth-child(3)) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.list tr:has(> td:nth-child(3)) > td { padding: 0; border: 0; text-align: left; }
  table.list tr:has(> td:nth-child(3)) > td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  table.list tr:has(> td:nth-child(3)) > td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  /* 버튼이 여럿인 칸(텔레그램 채널의 끄기·사진 글 번역·삭제)은 이름 칸을 누르지 않게 맨 아래 줄로 */
  table.list tr:has(> td:nth-child(3)) > td:nth-child(3):has(.inline + .inline) { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
  /* 설명 표(약관·방침): 항목 아래에 설명 */
  .prose table.list tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .prose table.list td, .prose table.list td:first-child { display: block; width: auto; padding: 0; border: 0; }
  .prose table.list td:first-child { margin-bottom: 2px; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * 12. 휴대폰 다시 배치(11-14): Apple Music 휴대폰 웹(직접 잰 배치)을 따른다
 *   - 머리줄 52px: 왼쪽 ☰, 가운데 로고, 오른쪽 내 사진. ☰ 를 누르면 머리줄 아래를 덮는 반투명 메뉴(서버·음악·내 정보·도움말·로그아웃)
 *   - 쪽 제목은 크게(iOS 큰 제목), 안쪽 쪽은 위에 "‹ 앞 쪽 이름"
 *   - 서버 설정은 가로로 넘기는 탭 대신 목록을 눌러 들어간다(iOS 설정과 같다. 넘기는 탭은 뒤쪽이 숨는다)
 *   - 구역은 둥근 무리(inset grouped), 켜고 끄기는 줄 오른쪽 스위치, 저장은 무리 폭 전체 버튼
 * ═══════════════════════════════════════════════════════════════════════ */
.menu-btn, .menu-sheet { display: none; }
@media (max-width: 760px) {
  .top { position: sticky; top: 0; z-index: 30; min-height: 52px; padding: 0 14px; gap: 8px; flex-wrap: nowrap;
    background: var(--bg); }
  .top nav, .user > span:not(.avatar), .user form, .top > .button { display: none; }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; padding: 0; color: var(--text); background: none; border: 0; cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); }
  .brand span { display: inline; }
  .user { margin-left: auto; }
  main { padding: 12px 16px 28px; }
  main h1, .ptitle { font-size: 30px; line-height: 1.2; letter-spacing: -.01em; margin: 4px 0 16px; }
  .gtitle h1 { font-size: 24px; margin: 0; }
  .ptitle .botmark { margin-left: 10px; vertical-align: -3px; }

  /* ☰ 메뉴: 머리줄 아래를 덮는 반투명 목록. 열려 있는 동안 뒤 본문은 스크롤하지 않는다 */
  :root.menu-open, :root.menu-open body { overflow: hidden; }
  .menu-sheet {
    display: flex; flex-direction: column; position: fixed; inset: 52px 0 0; z-index: 29; padding: 12px 17px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto;
    background-color: var(--bg);
  }
  .menu-sheet ul { list-style: none; margin: 0; padding: 0; }
  .menu-sheet a, .menu-sheet button {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 10px; border: 0; border-radius: 10px;
    font: inherit; font-size: 17px; color: var(--text); text-decoration: none; background: none; cursor: pointer; text-align: left;
  }
  .menu-sheet .on { background: var(--sel-bg); color: var(--sel-fg); font-weight: 600; }
  .menu-sheet svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .menu-sheet form { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
  .menu-sheet .out { color: var(--muted); }
  .menu-sheet > .button { margin-top: 16px; justify-content: center; }

  /* 재생 막대(바닥에서 10px, 높이 52px)가 바닥글·저장 막대를 가리지 않게 */
  body:has(.mp .player) { padding-bottom: 72px; }
  body:has(.mp .player) footer { padding-bottom: 24px; }
  body:has(.mp .player) .savebar { bottom: calc(74px + env(safe-area-inset-bottom)); }

  /* 구역: PC 와 같은 컨셉 그대로(점선 + 시작점의 ✦ + 관측 번호 01·02). 휴대폰이라고 회색 상자로 바꾸지 않는다 */
  .rail-body .card, main > section > .card { padding: 22px 0; }
  .card select, .card input[type=number], .card input[type=text], .card textarea { max-width: none; }
  details.help > div { width: min(360px, calc(100vw - 64px)); }

  /* 켜고 끄기: 글은 왼쪽, PC 와 같은 ✦ 체크(켜지면 반전 + 네 갈래 별)는 오른쪽 끝. 손가락에 맞게 24px, 줄 사이 옅은 점선 */
  form label.check { flex-direction: row-reverse; justify-content: space-between; gap: 16px; min-height: 48px; }
  form label.check + label.check { border-top: 1px dashed var(--line); }
  input[type=checkbox] { width: 24px; height: 24px; }
  input[type=checkbox]::before { width: 14px; height: 14px; }

  /* 저장: 폭 전체(엄지로 누르기 쉽게). 모양은 PC 와 같은 얇은 테두리 버튼. 저장 결과 안내는 그 아래 줄 */
  .card form > .actions > .button:first-child { flex: 1 1 100%; min-height: 48px; }
  /* 버튼 높이는 휴대폰에서 모두 48px(저장만 48 이고 추가·삭제·펼치기가 44 라 한 쪽에 두 높이가 섞였다) */
  .button, button.button, form .button, button.link.danger, details:not(.help) > summary { min-height: 48px; }
  .actions .savednote { margin: 0; }

  /* 서버 목록: PC 와 같은 관측 번호 줄. 줄 사이 점선 */
  .servers { margin: 8px 0 0; }
  .servers li + li { border-top: 1px dashed var(--line); }
  .servers a { min-height: 60px; padding: 8px 4px; }

  /* 설정 목차: PC 의 별자리 목차(왼쪽 세로선 · 항목마다 점 · 관측 번호)를 세로로 눌러 들어가는 목록으로. 끝에 › */
  .drill { display: flex; flex-direction: column; margin: 8px 0 0 8px; border-left: 1px solid var(--line); }
  .drill a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px 0 22px; color: var(--text); text-decoration: none; }
  .drill a::before {
    content: ""; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--muted);
  }
  /* 누르는 동안 점이 네 갈래 별로(PC 목차의 "지금 위치" 표식) */
  .drill a:active::before {
    left: -8px; width: 15px; height: 15px; margin-top: -7.5px; border-radius: 0; background: var(--text);
    -webkit-mask: var(--spark) center / contain no-repeat; mask: var(--spark) center / contain no-repeat;
  }
  .drill a:active .idx { color: var(--text); }
  .drill .t { flex: 1; }
  .drill .chev { width: 8px; height: 8px; margin-right: 4px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }

  /* 설정 쪽 안: 위에 "‹ 서버 이름"(iOS 뒤로), 그 아래 큰 제목 */
  .server .backrow { min-height: 0; }
  .link.back { gap: 6px; color: var(--text); font-weight: 500; }
  .link.back::before { content: ""; width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
  .server.inside .rail-body .card:first-child { margin-top: 0; }

}

/* 13. 휴대폰 움직임(11-14): ☰ 메뉴 항목이 차례로, 서버 설정은 들어가면 오른쪽에서·나오면 왼쪽에서 밀려 들어오고, 누르면 살짝 눌린다.
 *     뒤로 가기 쓸기는 브라우저(iOS Safari·Android)가 이미 해 준다. 움직임 줄이기를 켠 기기에서는 끈다 */
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .menu-sheet { animation: dash-fade .2s ease-out both; }
  .menu-sheet li, .menu-sheet form { animation: dash-item .3s cubic-bezier(.2, .8, .2, 1) both; }
  .menu-sheet li:nth-child(2) { animation-delay: 28ms; }
  .menu-sheet li:nth-child(3) { animation-delay: 56ms; }
  .menu-sheet li:nth-child(4) { animation-delay: 84ms; }
  .menu-sheet form { animation-delay: 112ms; }
  @keyframes dash-fade { from { opacity: 0; } }
  @keyframes dash-item { from { opacity: 0; transform: translateY(-8px); } }
  .server.inside .rail-body, .server.inside .ptitle { animation: dash-push .3s cubic-bezier(.2, .8, .2, 1) both; }
  .server .drill { animation: dash-back .3s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes dash-push { from { opacity: .3; transform: translateX(28%); } }
  @keyframes dash-back { from { opacity: .3; transform: translateX(-18%); } }
  .menu-btn, .button, .menu-sheet a, .menu-sheet button, .drill a, .servers a { transition: transform .12s, background-color .15s; }
  .menu-btn:active, .button:active { transform: scale(.94); }
  .menu-sheet a:active, .menu-sheet button:active { background: var(--surface); }
  input[type=checkbox] { transition: transform .12s, background-color .15s; }
  input[type=checkbox]:active { transform: scale(.88); }
}

:root {
  --band:
    linear-gradient(180deg, transparent 45%, rgb(24 44 78 / .55)),
    linear-gradient(90deg, #1c1a33 0%, #261c45 18%, #251d48 32%, #20214b 45%, #1c2752 58%, #15314f 72%, #17334e 84%, #231f4b 100%);
  --wire: rgb(250 250 250 / .5);
  --spark-thin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10C0-1.7 1.7 0 10 0C1.7 0 0 1.7 0 10C0 1.7-1.7 0-10 0C-1.7 0 0-1.7 0-10Z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  :root {
    --band:
      linear-gradient(180deg, transparent 45%, rgb(196 222 250 / .6)),
      linear-gradient(90deg, #e3ddf5 0%, #d6c8f8 18%, #d4c9f9 32%, #cdcff9 45%, #c8d6fc 58%, #c1e2fd 72%, #c3e5fc 84%, #d0cffc 100%);
    --wire: #18181b;
  }
}
body { overflow-x: clip; }
/* body 의 clip 은 화면 전체로 옮겨 가서, 휴대폰 서버 탭이 밀려 들어오는 첫 0.1초에 화면 폭이 474px 까지 늘어나는 것을 못 막는다(12-01). 지우지 말 것 */
main { overflow-x: clip; }

.server:has(> .gband) { margin-top: -32px; }
.gband {
  --gc: calc((100vw - 100%) / 2);
  position: relative; isolation: isolate; min-height: 198px; margin: 0 0 24px; padding: 32px 0 17px;
  background: none; border: 0; border-bottom: 1px solid var(--text);
}
.gband::before { content: ""; position: absolute; z-index: -2; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; background: var(--band); }
.gband::after { content: none; }
.gband .backrow { min-height: var(--h); }
.gband .gtitle { margin: 32px 0 0; }
.gband .gmeta { margin-top: 12px; color: color-mix(in srgb, var(--text) 72%, transparent); }
.gband .link { color: color-mix(in srgb, var(--text) 72%, transparent); }
.gband .link:hover { color: var(--text); }
.gmeta > span + span::before { content: ""; display: inline-block; width: 1px; height: 11px; margin-right: 18px; vertical-align: -1px; background: currentColor; opacity: .45; }

.y2k { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.y2k svg { position: absolute; overflow: visible; fill: none; stroke: var(--wire); stroke-width: .8; }
.y2k path { vector-effect: non-scaling-stroke; }
.y2k-wavy { top: 0; height: 100%; right: calc(100% + var(--gc) * .58); width: min(250px, var(--gc) * .36); }
.y2k-plus-l { top: 98px; right: calc(100% + var(--gc) * .25); width: 64px; height: 64px; }
.y2k-grid { top: 0; right: 0; width: 258px; height: 100%; }
.y2k-plus-r { top: 53px; right: 272px; width: 42px; height: 100px; }
.y2k-sparks { top: 20px; right: calc(var(--gc) * -.95); width: min(209px, var(--gc) * .85); aspect-ratio: 210 / 186; }
.y2k-sparks path { fill: var(--text); stroke: none; }
@media (max-width: 1100px) { .y2k-wavy, .y2k-plus-l, .y2k-sparks { display: none; } }

.rail { z-index: 1; }
.rail::before {
  content: ""; position: absolute; z-index: -1; left: -177px; top: -24px; width: 353px; height: calc(100% + 24px + 88px); pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; background-position: 0 24px, 0 0; box-shadow: inset -1px -1px 0 var(--line);
}
.rail-deco { position: absolute; left: 0; top: 100%; width: 0; height: 0; pointer-events: none; }
.rail-deco svg { position: absolute; overflow: visible; fill: none; }
.rail-x { left: -176px; top: 0; width: 176px; height: 130px; stroke: var(--line-strong); stroke-width: 1.2; }
.rail-torus { left: -12px; top: 32px; width: 168px; height: 138px; stroke: var(--muted); stroke-width: .7; opacity: .8; }

.star-trail { left: -18px; top: -18px; width: 36px; height: 36px; }
.star-trail b { -webkit-mask-image: var(--spark-thin); mask-image: var(--spark-thin); }

.rail-body .card { border-top: 0; }
.rail-body .card::after { content: ""; position: absolute; top: 0; left: -14px; right: 0; border-top: 1px solid var(--line-strong); }
.rail-body .card:first-child::after { display: none; }
.rail-body .card::before {
  z-index: 1; left: -12px; top: -18px; width: 36px; height: 36px;
  -webkit-mask-image: var(--spark-thin); mask-image: var(--spark-thin);
}

@media (prefers-reduced-motion: no-preference) { .gband { animation: none; } }

@media (max-width: 760px) {
  .server:has(> .gband) { margin-top: -12px; }
  .gband { min-height: 0; padding: 8px 0 16px; }
  .gband .gtitle { margin-top: 12px; }
  .gmeta > span + span::before { content: none; }
  .y2k-wavy, .y2k-plus-l, .y2k-plus-r, .y2k-grid { display: none; }
  .y2k-sparks { display: block; top: 10px; right: -6px; width: 118px; }
}

:root {
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-quint: cubic-bezier(.22, 1, .36, 1);
  --ease-reveal: cubic-bezier(.22, .61, .36, 1);
  --ease-draw: cubic-bezier(.33, 1, .68, 1);
}

.y2k-hud {
  position: absolute; right: 270px; bottom: 8px; padding: 3px 6px; font: 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--text); background: color-mix(in srgb, var(--bg) 72%, transparent); opacity: 0; transition: opacity .2s;
}
.y2k-hud.on { opacity: 1; }
.y2k-hud .caret { display: inline-block; width: 6px; height: 9px; margin-left: 5px; vertical-align: -1px; background: currentColor; }
.y2k-grid .y2k-cell { fill: color-mix(in srgb, var(--wire) 14%, transparent); stroke: var(--wire); stroke-width: 1; stroke-dasharray: 1 2; vector-effect: non-scaling-stroke; }

.rail a::after, .top nav a::after {
  content: ""; position: absolute; pointer-events: none; border: 2px dotted transparent; transition: border-color .2s;
}
.rail a::after { inset: 5px 4px 5px 12px; }
.top nav a { position: relative; }
.top nav a::after { inset: 8px 2px; }
.rail a:not(.on):hover::after, .top nav a:not(.on):hover::after { border-color: color-mix(in srgb, var(--text) 55%, transparent); }

.gband::after { content: none; }
.scramble { display: inline-grid; }
.scramble > span { grid-area: 1 / 1; white-space: nowrap; }
.scramble-fit { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .y2k svg:not(.y2k-sparks) { animation: wire-wipe 1.25s var(--ease-draw) var(--wd, .15s) backwards; }
  .y2k svg.y2k-grid { --wd: .15s; animation-name: wire-wipe-down; }
  .y2k-plus-r { --wd: .27s; }
  .y2k-wavy { --wd: .39s; }
  .y2k-plus-l { --wd: .51s; }
  @keyframes wire-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes wire-wipe-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

  .gband > .backrow, .gband > .gtitle, .gband > .gmeta { animation: band-in .8s var(--ease-expo) backwards; }
  .gband > .gtitle { animation-delay: .15s; }
  .gband > .gmeta { animation-delay: .3s; }
  @keyframes band-in { from { opacity: 0; transform: translateY(20px); } }

  .y2k-sparks .sp { transform-box: fill-box; transform-origin: center; animation: spark-twinkle var(--tw, 4.5s) ease-in-out var(--twd, 0s) infinite alternate; }
  .y2k-sparks .sp1 { --tw: 4.5s; }
  .y2k-sparks .sp2 { --tw: 7s; --twd: -2s; }
  .y2k-sparks .sp3 { --tw: 11s; --twd: -4s; }
  .y2k-sparks .sp0 { animation: spark-glint 10s var(--ease-expo) 2s infinite; }
  @keyframes spark-twinkle { from { opacity: 1; scale: 1; } to { opacity: .78; scale: .94; } }
  @keyframes spark-glint { 0%, 86% { rotate: 0deg; scale: 1; } 93% { scale: 1.12; } 100% { rotate: 90deg; scale: 1; } }

  .y2k-sparks { animation: float-bob 4s ease-in-out infinite alternate; }
  @keyframes float-bob { from { translate: 0 0; } to { translate: 0 -5px; } }

  .y2k-sparks { transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -8px), 0); }
  .y2k-grid, .y2k-plus-r { transform: translate3d(calc(var(--px, 0) * 6px), calc(var(--py, 0) * 3px), 0); }
  .y2k-wavy, .y2k-plus-l { transform: translate3d(calc(var(--px, 0) * -8px), calc(var(--py, 0) * 4px), 0); }
  .y2k-sparks, .y2k-grid, .y2k-plus-r, .y2k-wavy, .y2k-plus-l { transition: transform 1s var(--ease-quint); }

  .gband::before { background-size: 100% 100%, 140% 100%; animation: aurora 14s ease-in-out infinite alternate; }
  @keyframes aurora { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 100% 0; } }

  .y2k-hud .caret { animation: caret-blink 1s step-end infinite; }
  @keyframes caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

  .rail::before { animation: grid-in 1.1s var(--ease-draw) .1s backwards; }
  @keyframes grid-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  .rail-deco { animation: deco-in 1s var(--ease-reveal) .5s backwards; }
  @keyframes deco-in { from { opacity: 0; } }
  .star-trail.go { transition: transform .6s var(--ease-expo); }

  .rail-body .card::after { transform-origin: left; animation: line-draw 1.25s var(--ease-draw) calc(var(--d, 0s) + .1s) backwards; }
  @keyframes line-draw { from { transform: scaleX(0); } }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.corner { position: absolute; width: 12px; height: 12px; border: 1.5px solid var(--text); pointer-events: none; }
.corner.tl { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
.corner.br { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.mini-sparks { position: absolute; width: 90px; height: 80px; pointer-events: none; }
:is(.mini-sparks, .globe-sparks, .radar) .sp { fill: var(--text); }

.y2k-hero { position: relative; isolation: isolate; margin-top: -32px; min-height: 500px; grid-template-columns: minmax(0, 1fr) 420px; padding: 40px 0; }
.y2k-hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; inset-inline-end: auto; opacity: 1; animation: none; background: var(--band); }
.y2k-hero::after { content: none; }
.y2k-hero h1 { font-size: 44px; line-height: 1.15; margin: 6px 0 20px; letter-spacing: -.01em; }
.hero-kicker { margin: 0; font: 12px/1 var(--mono); letter-spacing: .22em; color: color-mix(in srgb, var(--text) 70%, transparent); }
.globe { position: relative; width: 420px; height: 420px; }
.globe svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; }
.globe .g-front { stroke: var(--wire); stroke-width: 1; }
.globe .g-back { stroke: var(--wire); stroke-width: .8; opacity: .22; stroke-dasharray: 2 4; }
.globe .g-limb { stroke: var(--wire); stroke-width: 1.4; fill: color-mix(in srgb, var(--bg) 22%, transparent); }
.globe .g-ring { stroke: var(--wire); stroke-width: 1.6; }
.globe .g-ring.back { opacity: .35; stroke-dasharray: 3 4; }
.globe .moon-gap { fill: color-mix(in srgb, var(--bg) 55%, transparent); }
.globe .moon-body { fill: var(--text); }
.bots { margin-top: 32px; gap: 20px 28px; border-top: 0; }
.bots .card.bot { position: relative; padding: 22px 22px 22px 18px; border: 1px solid var(--line-strong); }
.bot-no { position: absolute; top: 8px; right: 12px; font: 11px var(--mono); color: var(--muted); letter-spacing: .1em; }

.chart-page { margin-top: -32px; }
.sband { position: relative; isolation: isolate; padding: 30px 0 18px; margin-bottom: 8px; border-bottom: 1px solid var(--text); }
.sband::before { content: ""; position: absolute; z-index: -2; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; background: var(--band); }
.sband h1 { font-size: 30px; margin: 0; }
.sband .row { justify-content: flex-start; gap: 20px; }
.sband-meta { display: flex; gap: 18px; margin: 10px 0 0; font: 12px var(--mono); letter-spacing: .08em; color: color-mix(in srgb, var(--text) 72%, transparent); }
.sband-meta > span + span::before { content: ""; display: inline-block; width: 1px; height: 11px; margin-right: 18px; vertical-align: -1px; background: currentColor; opacity: .45; }
.sband-meta > .hold { visibility: hidden; }
.radar { position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 300px; overflow: hidden; pointer-events: none; }
.radar svg { position: absolute; right: 0; top: 50%; width: 280px; height: 280px; margin-top: -140px; overflow: visible; fill: none; stroke: var(--wire); stroke-width: .7; }
.radar circle, .radar line { opacity: .5; }
.radar .radar-sweep path { fill: color-mix(in srgb, var(--wire) 14%, transparent); stroke: none; }
.radar .radar-sweep { transform-box: view-box; transform-origin: 280px 140px; }
.chart a { position: relative; isolation: isolate; min-height: 72px; }
.chart a:hover { background: none; }
.chart li + li { border-top: 1px dashed var(--line-strong); }
.chart .name { display: flex; flex-direction: column; gap: 2px; }
.chart .coord { font: 400 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.chart a::after { content: ""; position: absolute; inset: 6px 0; border: 2px dotted transparent; transition: border-color .2s; pointer-events: none; }
.chart a:hover::after { border-color: color-mix(in srgb, var(--text) 55%, transparent); }
.chart a:hover .idx { color: var(--text); }
.chart-page .servers a:hover .gicon { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--text); }

.idcard { position: relative; max-width: 560px; margin: 12px 0 40px; border: 1px solid var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px; }
.idcard-holo { height: 16px; border-bottom: 1px solid var(--text);
  background: linear-gradient(115deg, #ff9ed8, #ffd8a8, #b9f5d8, #9ad1ff, #b9a7ff, #ff9ed8) 0 0 / 300% 100%; }
.idcard-body { display: flex; align-items: center; gap: 22px; padding: 26px 28px 34px; }
.idcard-av { width: 84px; height: 84px; border-radius: 50%; flex: none; outline: 1px solid var(--text); outline-offset: 4px; }
.idcard-av.blank { display: inline-flex; align-items: center; justify-content: center; background: var(--surface); font-size: 30px; font-weight: 700; }
.idcard-label { font: 11px var(--mono); letter-spacing: .18em; color: var(--muted); }
.idcard-name { margin: 2px 0 4px; font-size: 28px; font-weight: 700; line-height: 1.2; }
.idcard-text .num { font: 13px var(--mono); }
.idcard-code { position: absolute; right: 14px; bottom: 10px; font: 10px var(--mono); letter-spacing: .24em; color: var(--muted); }
.idcard-sparks { right: -46px; top: -40px; }

.win { position: relative; isolation: isolate; max-width: 720px; margin: 8px 0 24px; outline: 1px solid var(--text); outline-offset: -1px; }
.win::before { content: ""; position: absolute; z-index: -1; inset: 0; transform: translate(10px, 10px); border: 1px solid var(--text); background: var(--band); }
.win-bar { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--text); background: var(--band); }
.win-title { font: 12px var(--mono); letter-spacing: .22em; }
.win-btns { display: flex; gap: 6px; }
.win-btns i { width: 13px; height: 13px; border: 1px solid var(--text); background: var(--bg); }
.win-btns i:last-child { background: var(--text); }
.win-body { padding: 26px 34px 30px; max-width: none; background: var(--bg); }
.win-body h1 { margin-top: 0; }
.win-sparks { right: -54px; top: -46px; }
main:has(.win) { isolation: isolate; }

.sheet { position: relative; max-width: 720px; padding: 0 0 0 52px; margin: 8px 0; }
.sheet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 24px; border-right: 1px solid var(--text);
  background:
    repeating-linear-gradient(to bottom, var(--text) 0 1px, transparent 1px 40px) right top / 16px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--muted) 0 1px, transparent 1px 8px) right top / 7px 100% no-repeat; }
.sheet-head { display: flex; justify-content: space-between; margin: 0 0 22px; padding: 7px 0; border-top: 2px solid var(--text); border-bottom: 1px solid var(--text);
  font: 11px var(--mono); letter-spacing: .18em; }
.sheet.prose h2::before { content: "§" counter(q, decimal-leading-zero); }

.glossary .tabs { background: none; padding: 0; gap: 0; border-radius: 0; border-bottom: 1px solid var(--text); display: flex; }
.glossary .tabs a { border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; margin-right: -1px; }
.glossary .tabs a.on { background: var(--band); color: var(--text); border-color: var(--text); position: relative; z-index: 1; }
.glossary-head { border-top: 1px solid var(--text); border-bottom: 1px solid var(--text); }
.glossary-head > span::before { content: "+"; margin-right: 6px; font-family: var(--mono); color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  :is(.mini-sparks, .globe-sparks, .radar) .sp { transform-box: fill-box; transform-origin: center; animation: spark-twinkle var(--tw, 4.5s) ease-in-out var(--twd, 0s) infinite alternate; }
  :is(.mini-sparks, .globe-sparks, .radar) .sp2 { --tw: 7s; --twd: -2s; }
  :is(.mini-sparks, .globe-sparks, .radar) .sp3 { --tw: 11s; --twd: -4s; }
  .radar .radar-sweep { animation: radar 10s linear infinite; }
  @keyframes radar { to { rotate: -360deg; } }
  .idcard-holo { animation: holo-shift 21s linear infinite; }
  .idcard, .win, .sheet { animation: pop-in .5s var(--ease-expo) backwards; }
  @keyframes pop-in { from { opacity: 0; transform: scale(.96); } }
  @keyframes holo-shift { to { background-position: 300% 0; } }
  .y2k-hero > .hero-text > * { animation: band-in .8s var(--ease-expo) backwards; }
  .y2k-hero > .hero-text > :nth-child(2) { animation-delay: .12s; }
  .y2k-hero > .hero-text > :nth-child(n+3) { animation-delay: .24s; }
  .globe { animation: deco-in 1.2s var(--ease-reveal) .2s backwards; }
  .sband > .row, .sband > .sband-meta { animation: band-in .8s var(--ease-expo) backwards; }
  .sband > .sband-meta { animation-delay: .12s; }
  .sband .radar { animation: deco-in 1s var(--ease-reveal) .15s backwards; }
  .chart li:nth-child(1), .gband ~ div .rail-body > .card:nth-child(1), .idcard ~ .rail-body > .card:nth-child(1) { --d: .2s; }
  .chart li:nth-child(2), .gband ~ div .rail-body > .card:nth-child(2), .idcard ~ .rail-body > .card:nth-child(2) { --d: .26s; }
  .chart li:nth-child(3), .gband ~ div .rail-body > .card:nth-child(3), .idcard ~ .rail-body > .card:nth-child(3) { --d: .32s; }
  .chart li:nth-child(4), .gband ~ div .rail-body > .card:nth-child(4), .idcard ~ .rail-body > .card:nth-child(4) { --d: .38s; }
  .chart li:nth-child(n+5), .gband ~ div .rail-body > .card:nth-child(n+5), .idcard ~ .rail-body > .card:nth-child(n+5) { --d: .44s; }
  .y2k-hero ~ .bots .card { --d: .4s; }
  .y2k-hero ~ .bots .card:nth-child(2) { --d: .48s; }
}

@media (max-width: 760px) {
  .y2k-hero { margin-top: -12px; grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 24px 0; }
  .y2k-hero h1 { font-size: 32px; }
  .globe { width: 300px; height: 300px; margin: 0 auto; }
  .chart-page { margin-top: -12px; }
  .radar { width: 200px; opacity: .7; }
  .idcard-body { padding: 20px; gap: 16px; }
  .idcard-name { font-size: 22px; }
  .idcard-sparks, .win-sparks { display: none; }
  .win::before { transform: translate(6px, 6px); }
  .win-body { padding: 20px; }
  .sheet { padding-left: 34px; }
}


.radar-trail { position: absolute; right: -280px; top: 50%; width: 560px; height: 560px; margin-top: -280px; border-radius: 50%;
  background: conic-gradient(transparent 0deg 315deg, color-mix(in srgb, var(--wire) 9%, transparent) 345deg, color-mix(in srgb, var(--wire) 24%, transparent) 360deg); }

.win-bar {
  position: relative; justify-content: center; height: 28px; padding: 0 34px;
  background: var(--bg) repeating-linear-gradient(to bottom, var(--text) 0 1.5px, transparent 1.5px 3.5px) 6px 5px / calc(100% - 12px) 19px no-repeat;
}
.win-title { position: relative; padding: 0 14px; background: var(--bg); line-height: 28px; }
.win-box { position: absolute; top: 50%; left: 10px; width: 15px; height: 15px; margin-top: -7.5px; border: 1px solid var(--text); background: var(--bg); }
.win-box.zoom { left: auto; right: 10px; }
.win-box.zoom::after { content: ""; position: absolute; left: 1px; top: 1px; width: 7px; height: 7px; border: 1px solid var(--text); }
.win-body { padding: 24px 48px 30px; }

.idcard { width: min(100%, 480px); max-width: none; aspect-ratio: 1.586; display: flex; flex-direction: column;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.idcard-body { flex: 1; padding: 22px 26px 10px; }
.idcard-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px dashed var(--line-strong);
  font: 10px var(--mono); letter-spacing: .24em; color: var(--muted); }
.idcard-code { display: none; }
.idcard-glare { position: absolute; inset: 0; pointer-events: none; opacity: calc(var(--go, 0) * .35); mix-blend-mode: hard-light;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), #ccc, rgb(191 191 191 / .25) 30%, #373737 130%); }

.sheet { isolation: isolate; }
.sheet::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 25px; right: 0; pointer-events: none;
  --g1: color-mix(in srgb, var(--text) 4%, transparent); --g2: color-mix(in srgb, var(--text) 8%, transparent);
  background-image: linear-gradient(var(--g1) 1px, transparent 1px), linear-gradient(90deg, var(--g1) 1px, transparent 1px),
    linear-gradient(var(--g2) 1px, transparent 1px), linear-gradient(90deg, var(--g2) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px; }

.button:not(.primary):not(.saved), details:not(.help) > summary { border-style: dashed; transition: border-color .1s, background-color .1s; }
.button:not(.primary):not(.saved):hover, details:not(.help) > summary:hover { border-style: solid; }
.rail a::after, .top nav a::after, .chart a::after { transition: border-color .1s; }
.rail a:not(.on):hover::after, .top nav a:not(.on):hover::after, .chart a:hover::after { border-style: solid; border-width: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .rail a:not(.on):hover::after, .top nav a:not(.on):hover::after, .chart a:hover::after { animation: ink .22s linear; }
  @keyframes ink { 0%, 55% { border-style: dotted; border-width: 2px; } 56%, 100% { border-style: solid; border-width: 1px; } }
  .radar-trail { animation: radar-cw 10s linear infinite; }
  @keyframes radar-cw { to { rotate: 360deg; } }
}
@media (max-width: 760px) {
  .win-body { padding: 20px 22px; }
  .idcard-body { padding: 16px 18px 8px; }
}

@media not (prefers-color-scheme: light) {
  :root {
    --bg: #13121d;
    --surface: #1c1b29;
    --line: #2a2939;
    --line-strong: #3b3a4f;
    --text: #e0def4;
    --muted: #a6adc8;
    --sel-bg: #cdd6f4;
    --sel-fg: #13121d;
    color-scheme: dark;
    --band:
      radial-gradient(in oklch 60% 160% at 22% 20%, rgb(203 166 247 / .46), transparent 74%),
      radial-gradient(in oklch 50% 160% at 70% 35%, rgb(137 220 235 / .32), transparent 72%),
      radial-gradient(in oklch 40% 140% at 98% 60%, rgb(180 190 254 / .40), transparent 72%),
      linear-gradient(in oklch 180deg, transparent 40%, rgb(116 199 236 / .18)),
      #1a1830;
    --wire: rgb(196 204 255 / .82);
  }
  .gband::after, .sband::after {
    content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; pointer-events: none;
    opacity: .14; mix-blend-mode: overlay; animation: none; visibility: visible;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9713' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .y2k-sparks path, :is(.mini-sparks, .globe-sparks, .radar) .sp { filter: drop-shadow(0 0 9px rgb(203 166 247 / .8)); }
}

#root { flex: 1 0 auto; display: flex; flex-direction: column; }

.win.help { max-width: none; }
.help-panes { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 460px; background: var(--bg); }
.help-list { border-right: 1px solid var(--text); padding: 22px 0 16px; }
.help-list h1 { font-size: 20px; margin: 0 22px 14px; }
.help-list ol { list-style: none; margin: 0; padding: 0; }
.help-list button {
  position: relative; display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: var(--h); padding: 10px 22px;
  font: inherit; font-size: 14px; line-height: 1.45; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer;
}
.help-list button::after { content: ""; position: absolute; inset: 3px 8px; pointer-events: none; border: 2px dotted transparent; transition: border-color .1s; }
.help-list button:not(.on):hover::after { border-style: solid; border-width: 1px; border-color: color-mix(in srgb, var(--text) 55%, transparent); }
.help-list button.on { background: var(--sel-bg); color: var(--sel-fg); font-weight: 600; }
.help-list button.on .idx { color: inherit; }
.help-view { padding: 30px 40px; max-width: 640px; }
.help-no { display: block; font: 12px var(--mono); letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.help-view h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 22px; line-height: 1.35; }
.help-view h2::before { content: none; }
.help-all { display: none; }
.win-status { display: flex; justify-content: space-between; padding: 3px 10px; border-top: 1px solid var(--text); background: var(--bg);
  font: 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .help-list button:not(.on):hover::after { animation: ink .22s linear; }
  .help-view { animation: deco-in .25s var(--ease-reveal); }
}
@media (max-width: 760px) {
  .help-panes { display: block; min-height: 0; }
  .help-list, .help-view { display: none; }
  .help-all { display: block; padding: 20px 22px; }
  .help-all section + section { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
  .help-all h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 17px; }
}
.help-list .idx { flex: none; width: 20px; white-space: nowrap; }
.help-panes { min-height: 0; }
.help-view { position: relative; max-width: none; }
.help-view > :not(.help-big) { position: relative; max-width: 560px; }
.help-big { position: absolute; right: 24px; bottom: 8px; font: 400 128px/1 var(--mono); letter-spacing: -.04em; color: transparent;
  -webkit-text-stroke: 1px var(--line-strong); pointer-events: none; user-select: none; }
@media (max-width: 760px) { .help-big { display: none; } }

.sband .radar { display: none; }
.sband-sparks { right: 0; top: 14px; }
.chart-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 40px; align-items: start; }
.star-chart { position: sticky; top: 24px; margin: 18px 0 0; padding: 16px 16px 12px; border: 1px solid var(--line-strong); }
.chart-face { position: relative; aspect-ratio: 1; }
.chart-face svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-trail { position: absolute; inset: 2.2%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(transparent 0deg 315deg, color-mix(in srgb, var(--wire) 4%, transparent) 345deg, color-mix(in srgb, var(--wire) 12%, transparent) 360deg); }
.star-chart .ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.star-chart .spoke { stroke: var(--line); stroke-width: 1; }
.star-chart .hour { font: 9px var(--mono); letter-spacing: .06em; fill: var(--muted); text-anchor: middle; }
.star-chart .star { cursor: pointer; transition: opacity .2s; }
.star-chart .hit { fill: transparent; }
.star-chart .sp { fill: var(--text); transform-box: fill-box; transform-origin: center; transition: transform .25s var(--ease-quint); }
.star-chart .label { font: 10px var(--mono); fill: var(--muted); }
.star-chart .star.on .sp { transform: scale(1.7); }
.star-chart .star.on .label { fill: var(--text); font-weight: 700; }
.star-chart.has-hl .star:not(.on) { opacity: .35; }
.star-chart figcaption { margin-top: 10px; font: 11px var(--mono); letter-spacing: .12em; color: var(--muted); text-align: center; }
.chart a.hl::after { border-style: solid; border-width: 1px; border-color: color-mix(in srgb, var(--text) 55%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .star-chart .sp { animation: spark-twinkle var(--tw, 4.5s) ease-in-out var(--twd, 0s) infinite alternate; }
  .star-chart .sp2 { --tw: 7s; --twd: -2s; }
  .star-chart .sp3 { --tw: 11s; --twd: -4s; }
  .chart-trail { animation: radar-cw 10s linear infinite; }
  .star-chart { animation: deco-in .9s var(--ease-reveal) .25s backwards; }
}
@media not (prefers-color-scheme: light) { .star-chart .sp { filter: drop-shadow(0 0 6px rgb(203 166 247 / .7)); } }
@media (max-width: 760px) {
  .chart-body { display: block; }
  .star-chart { position: relative; max-width: 320px; margin: 20px auto 0; animation-delay: .5s; }
  .sband-sparks { display: none; }
}
.chart-sweep { position: absolute; inset: 2.2%; border-radius: 50%; overflow: hidden; pointer-events: none; }
.chart-sweep .chart-trail { inset: 0; }
.chart-trail::after { content: ""; position: absolute; left: calc(50% - .5px); top: 0; width: 1px; height: 50%; background: linear-gradient(to top, transparent, color-mix(in srgb, var(--wire) 45%, transparent)); }
@property --lit { syntax: "<number>"; inherits: false; initial-value: 1; }
.star-chart .blip { opacity: max(var(--lit), var(--hold, 0)); }
.star-chart .star.on .blip { --hold: 1; }
.star-chart .ping { fill: none; stroke: var(--text); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .star-chart .blip { animation: blip 10s linear var(--blip, 0s) infinite; }
  .star-chart .ping { animation: ping 10s linear var(--blip, 0s) infinite; }
  @keyframes blip { 0%, 6% { --lit: 1; animation-timing-function: cubic-bezier(.33, 1, .68, 1); } 70%, 100% { --lit: .42; } }
  @keyframes ping { 0% { opacity: .6; scale: .7; animation-timing-function: cubic-bezier(.16, 1, .3, 1); } 16%, 100% { opacity: 0; scale: 2.8; } }
}
@media (max-width: 760px) {
  .chart .coord { white-space: normal; }
  .sband-meta { flex-direction: column; gap: 2px; }
  .sband-meta > span + span::before { content: none; }
}

.me-top { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 0 40px; align-items: stretch; margin: 12px 0 0; }
.me-top .idcard { margin: 0; }
.me-req { display: flex; flex-direction: column; min-width: 0; }
.me-req h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; font-size: 16px; }
.me-req h2 .idx { margin: 0; }
.me-count { margin-left: auto; font: 12px var(--mono); color: var(--muted); }
.me-empty { flex: 1; display: grid; place-items: center; margin: 0; min-height: 160px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 14px; }
.me-danger { counter-reset: sec 1; margin-top: 56px; }
.me-danger .card:first-child { border-top: 0; padding-top: 28px; }
.me-danger .card:first-child::after { display: block; }
.me-danger .card:first-child::before { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .me-req { animation: rise .42s cubic-bezier(.2, .7, .2, 1) .12s backwards; }
  .me-danger .card:first-child { --d: .26s; }
}
.bots .card.bot { display: flex; flex-direction: column; gap: 18px; align-items: stretch; padding: 24px 24px 20px; }
.bot-head { display: flex; align-items: center; gap: 16px; }
.bot-head img { width: 64px; height: 64px; }
.bot-head h2 { margin: 0; font-size: 22px; letter-spacing: .08em; }
.bot-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.bot-pulsar .bot-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bot-feats li { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 10px 8px 0 0; border-top: 1px dashed var(--line-strong); font-size: 14px; }
.bot-feats li:nth-child(n+4), .bot-pulsar .bot-feats li:nth-child(n+3) { margin-top: 10px; }
.bot-feats .num { flex: none; font: 11px var(--mono); color: var(--muted); }
.globe .moon-halo { fill: none; stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; transform-box: fill-box; transform-origin: center; scale: .6; transition: opacity .3s, scale .45s cubic-bezier(.16, 1, .3, 1); }
.y2k-hero[data-hl="cosmos"] .moon-halo { opacity: 1; scale: 1; }
.y2k-hero[data-hl="cosmos"] .g-ring:not(.back) { stroke-width: 2.2; }
.globe .g-ring { transition: stroke-width .3s; }
.globe .p-wave { fill: none; stroke: var(--text); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.y2k-hero[data-hl="pulsar"] .p-wave { opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .y2k-hero[data-hl="pulsar"] .p-wave { animation: p-wave 2.6s cubic-bezier(.33, 1, .68, 1) infinite; }
  .y2k-hero[data-hl="pulsar"] .p-wave + .p-wave { animation-delay: -1.3s; }
  @keyframes p-wave { from { opacity: .7; scale: .6; } to { opacity: 0; scale: 2.4; } }
}
@media (max-width: 760px) {
  .bot-feats, .bot-pulsar .bot-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bot-feats li:nth-child(n+3) { margin-top: 10px; }
  .me-top { grid-template-columns: minmax(0, 1fr); gap: 28px 0; }
  .me-empty { min-height: 96px; }
  .me-danger { margin-top: 36px; }
}

:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
.motion-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.motion-btn:hover { color: var(--text); }

.loading { animation: loading-in .2s ease .3s backwards; }
@keyframes loading-in { from { opacity: 0; } }

.star-chart .ring.inner { stroke-dasharray: 2 3; }
.star-chart .ring.equator { stroke: color-mix(in srgb, var(--text) 40%, transparent); }
.star-chart .band-tick { stroke: var(--line-strong); stroke-width: 1; }
.star-chart .hour { font: 600 10px var(--mono); letter-spacing: 0; fill: color-mix(in srgb, var(--text) 75%, transparent); }
.star-chart .hour .hh { font: 400 8px var(--mono); fill: var(--muted); }
.star-chart .telrad { opacity: 0; scale: .4; transform-box: fill-box; transform-origin: center; pointer-events: none; transition: opacity .2s, scale .35s cubic-bezier(.16, 1, .3, 1); }
.star-chart .telrad circle { fill: none; stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.star-chart .star.on .telrad { opacity: .8; scale: 1; }
.star-chart .star.on .sp { transform: scale(1.25); }

.idcard-rosette { position: absolute; z-index: 0; right: 10px; top: 28px; width: 168px; height: 168px; pointer-events: none; }
.idcard-rosette path { fill: none; stroke: color-mix(in srgb, var(--wire) 32%, transparent); stroke-width: .7; vector-effect: non-scaling-stroke; }
.idcard-body, .idcard-mrz { position: relative; z-index: 1; }
.idcard-mrz { display: grid; gap: 3px; padding: 8px 14px 10px; border-top: 1px dashed var(--line-strong); font: 11px/1.15 var(--mono); color: color-mix(in srgb, var(--text) 80%, transparent); }
.idcard-mrz span { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); }
.idcard-mrz i { font-style: normal; text-align: center; }

.me-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.me-empty::before { content: ""; width: 140px; height: 8px; border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, #cdb8f6 0 14.3%, #b8d3f7 0 28.6%, #bfe9e0 0 42.9%, #f6e3b3 0 57.1%, #f5c5d8 0 71.4%, #d8d0f1 0 85.7%, #ecebf2 0); }
@media (max-width: 760px) {
  .idcard-rosette { right: 6px; top: 34px; width: 128px; height: 128px; opacity: .6; }
}

footer { flex-wrap: wrap; row-gap: 0; }
footer > * { white-space: nowrap; }
.crumb { view-transition-name: backrow; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  /* iOS 사파리는 16px 미만 입력칸을 누르면 화면을 확대한다. 16px 아래로 내리지 말 것 */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1em); }
  footer { gap: 0 6px; padding: 12px 16px 20px; align-items: center; }
  footer > a, footer > .motion-btn { display: inline-flex; align-items: center; min-height: 44px; }

  .servers.chart a { display: grid; grid-template-columns: auto 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
  .servers.chart .idx, .servers.chart .gicon, .servers.chart .name { grid-row: 1 / 3; }
  .servers.chart .marks { grid-column: 4; grid-row: 1; align-self: end; display: flex; gap: 4px; }
  .servers.chart .tag { grid-column: 4; grid-row: 2; justify-self: end; align-self: start; }
  .servers.chart .name { min-width: 0; }
  .chart .coord { white-space: nowrap; font-size: 12px; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; }

  .help-all { padding: 12px 18px 16px; }
  .help-all h1 { margin: 6px 0 8px; }
  .faq { border-bottom: 1px dashed var(--line-strong); }
  details.faq > summary, details.faq[open] > summary { width: 100%; border: 0; border-radius: 0; background: none; color: inherit; justify-content: flex-start; text-align: left; }
  details.faq > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; list-style: none; cursor: pointer; font-weight: 600; }
  .faq > summary::-webkit-details-marker { display: none; }
  .faq > summary .idx { flex: none; width: 22px; }
  .faq > summary .t { flex: 1; }
  .faq > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 6px 4px 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
  .faq[open] > summary::after { transform: rotate(225deg); margin-bottom: -4px; }
  .faq > :not(summary) { margin: 0 0 14px 34px; }

  .crumb { margin: 0 0 4px; }
  details.crumb > summary, details.crumb[open] > summary { width: 100%; border: 0; border-radius: 0; background: none; color: inherit; padding: 0; justify-content: flex-start; font-weight: 400; }
  details.crumb > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; }
  .crumb > summary::-webkit-details-marker { display: none; }
  .crumb .back { flex: none; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crumb-here { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; white-space: nowrap; }
  .crumb-here::before { content: "›"; color: var(--muted); font-weight: 400; margin-right: 2px; }
  .crumb-here .idx { font-size: 12px; }
  .crumb-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; }
  .crumb-btn::before { content: ""; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); transition: transform .2s; }
  .crumb[open] .crumb-btn::before { transform: rotate(225deg); margin-top: 4px; }
  .crumb .drill { margin: 0 0 12px 8px; animation: none; }
  .crumb .drill a.on { font-weight: 600; }
  .crumb .drill a.on::after { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 2px; background: var(--text); }

  .y2k-hero { display: block; min-height: 0; margin-inline: -16px; padding: 28px 16px 32px; overflow: hidden; }
  .y2k-hero .hero-text { position: relative; z-index: 1; max-width: 64%; }
  .y2k-hero .globe { position: absolute; right: -86px; top: 50%; width: 260px; height: 260px; margin: -130px 0 0; }
}

.sband .button:not(.primary):not(:hover) { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.gtitle h1 { min-width: 0; }
.gtitle .scramble { max-width: 100%; grid-template-columns: minmax(0, 1fr); }
.gtitle .scramble > span { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) { .gband .gtitle { padding-right: 330px; } }
@media (forced-colors: active) {
  input[type="checkbox"], input[type="radio"], input[type="range"] { appearance: auto !important; -webkit-appearance: auto !important; }
}
