/* ==========================================================================
   我的 Wiki — 简约风格样式表
   设计约定：一个强调色、克制的层级、1px 描边代替阴影、留白撑开节奏。
   ========================================================================== */

/* --- 设计变量 ------------------------------------------------------------ */
:root {
  color-scheme: light dark;

  /* 中性色：偏暖的灰阶，避免纯黑纯白的生硬感 */
  --bg:        #faf9f7;
  --surface:   #ffffff;
  --surface-2: #f4f2ef;
  --line:      #e7e4df;
  --line-soft: #efece7;
  --fg:        #1b1a18;
  --fg-2:      #45423e;
  --muted:     #7c766e;

  /* 强调色：与站点标识一致的深绿 */
  --accent:      #1f6f4a;
  --accent-weak: #eaf2ed;
  --accent-line: #c3ddcf;
  --ring:        rgba(31, 111, 74, .22);

  --danger:      #a52f2f;
  --danger-weak: #fbeeee;
  --danger-line: #e6c4c4;
  --warn:        #8a6516;
  --warn-weak:   #fdf7e8;
  --warn-line:   #e8d9b0;

  /* 尺度 */
  --w: 860px;
  --r-sm: 6px;
  --r:    9px;
  --r-lg: 14px;
  --pill: 999px;

  --shadow: 0 1px 2px rgba(24, 22, 20, .04);
  --shadow-lift: 0 2px 10px rgba(24, 22, 20, .07);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC",
          "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #121213;
    --surface:   #1a1a1c;
    --surface-2: #232326;
    --line:      #2e2e32;
    --line-soft: #27272a;
    --fg:        #eceae7;
    --fg-2:      #c9c6c1;
    --muted:     #918b83;

    --accent:      #6fc79b;
    --accent-weak: #16251d;
    --accent-line: #2c4a3a;
    --ring:        rgba(111, 199, 155, .26);

    --danger:      #e9908d;
    --danger-weak: #2a1a1a;
    --danger-line: #4a2d2d;
    --warn:        #d8b361;
    --warn-weak:   #26200f;
    --warn-line:   #453a1d;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 12px rgba(0, 0, 0, .4);
  }
}

/* --- 基础 ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent-line); }

h1, h2, h3 { color: var(--fg); font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 27px; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 19px; line-height: 1.35; margin: 0 0 4px; }

p { margin: 0 0 12px; }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-weak); color: var(--fg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* 键盘用户的跳转链接：默认藏起，聚焦时浮出 */
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 8px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lift); text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* --- 顶栏 ---------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: var(--bg); }
}

.topbar-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; gap: 14px;
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 650; letter-spacing: -.01em;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.brand-mark { border-radius: var(--r-sm); display: block; }
.brand:hover { color: var(--accent); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 5px 10px; border-radius: var(--r-sm);
  font-size: 14.5px; color: var(--fg-2); text-decoration: none;
}
.nav a:hover { background: var(--surface-2); color: var(--fg); }

.search { display: flex; gap: 6px; margin-left: auto; }
.search input {
  width: 190px; min-width: 0;
  padding: 7px 11px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--fg);
  font: inherit; font-size: 14px;
  transition: width .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none; width: 230px;
  border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring);
}
.search button {
  padding: 7px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--fg-2); cursor: pointer;
}
.search button:hover { background: var(--surface-2); color: var(--fg); }

.userbox { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.userbox > a:not(.btn) {
  font-size: 14.5px; color: var(--fg-2); text-decoration: none;
  padding: 5px 8px; border-radius: var(--r-sm);
}
.userbox > a:not(.btn):hover { background: var(--surface-2); color: var(--fg); }

.who {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--fg-2);
  max-width: 14ch; overflow: hidden; text-overflow: ellipsis;
}
.who::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

.logout { margin: 0; display: flex; }

/* --- 按钮 ---------------------------------------------------------------- */
.btn, button[type="submit"], .search button {
  font-family: inherit;
}

.btn, button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px;
  border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--accent); color: #fff;
  font-size: 14.5px; font-weight: 500; line-height: 1.4;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow);
  transition: filter .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover, button[type="submit"]:hover { filter: brightness(1.08); }
.btn:active, button[type="submit"]:active { filter: brightness(.96); box-shadow: none; }

@media (prefers-color-scheme: dark) {
  .btn, button[type="submit"] { color: #10251b; }
}

.btn.ghost {
  background: var(--surface); color: var(--fg-2); border-color: var(--line);
}
.btn.ghost:hover {
  filter: none; background: var(--surface-2);
  color: var(--fg); border-color: var(--accent-line);
}

.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }

.linklike {
  background: none; border: 0; padding: 5px 8px; border-radius: var(--r-sm);
  color: var(--fg-2); font: inherit; font-size: 14.5px; cursor: pointer;
}
.linklike:hover { background: var(--surface-2); color: var(--fg); }

/* --- 布局 ---------------------------------------------------------------- */
.container {
  max-width: var(--w);
  margin: 0 auto;
  padding: 34px 20px 72px;
}

.pagehead { margin-bottom: 22px; }
.pagehead .meta { margin: 0; }

.meta { color: var(--muted); font-size: 13.5px; }

.section { margin-top: 34px; }
.section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 14px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.section-title::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.site-footer .inner {
  max-width: var(--w); margin: 0 auto; padding: 18px 20px 28px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .sep { color: var(--line); user-select: none; }
.site-footer .beian { letter-spacing: .02em; }

/* --- 首页大区块 ---------------------------------------------------------- */
.hero { margin-bottom: 10px; }
.hero h1 { font-size: 32px; margin-bottom: 8px; }
.hero .lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; max-width: 52ch; }

.hero-search { display: flex; gap: 8px; max-width: 440px; margin-bottom: 14px; }
.hero-search input {
  flex: 1; min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 15px;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input:focus {
  outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring);
}

.stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; }
.stats li { display: flex; align-items: baseline; gap: 6px; }
.stats .n { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.stats .k { font-size: 13px; color: var(--muted); }

/* --- 卡片 ---------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lift);
}
.card h2 { margin: 0; font-size: 17.5px; }
.card h2 a { color: var(--fg); text-decoration: none; }
.card:hover h2 a { color: var(--accent); }
.card .meta { display: block; margin: 3px 0 0; }
.card .excerpt { margin: 9px 0 0; color: var(--fg-2); font-size: 14.5px; }
.card .tags { margin-top: 12px; }

.pin {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--warn); font-size: 12.5px; font-weight: 500;
}

/* --- 标签 ---------------------------------------------------------------- */
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid transparent;
  color: var(--fg-2); font-size: 13px; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.tag:hover { background: var(--accent-weak); border-color: var(--accent-line); color: var(--accent); }
.tag .n { color: var(--muted); font-size: 12px; }
.tag:hover .n { color: var(--accent); }

/* --- 表单 ---------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field > label {
  display: block; margin-bottom: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--fg-2);
}

input:where([type="text"], [type="email"], [type="password"], [type="url"],
            [type="number"], [type="date"]),
textarea, select {
  display: block; width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--fg);
  font-family: inherit; font-size: 15px; line-height: 1.6;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:where([type="text"], [type="email"], [type="password"], [type="url"],
            [type="number"], [type="date"])::placeholder,
textarea::placeholder { color: var(--muted); }

input:where([type="text"], [type="email"], [type="password"], [type="url"],
            [type="number"], [type="date"]):focus,
textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea { min-height: 340px; resize: vertical; font-family: var(--mono); font-size: 14px; line-height: 1.75; }

/* 复选框单独排布，不占满整行 */
.field-check { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.field-check input[type="checkbox"] {
  width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer;
}
.field-check label { margin: 0; font-size: 14.5px; font-weight: 500; color: var(--fg-2); cursor: pointer; }

.helptext {
  margin: 6px 0 0;
  color: var(--muted); font-size: 12.5px; line-height: 1.6;
}
.helptext ul { margin: 4px 0 0; padding-left: 1.1em; }
.helptext li { margin: 2px 0; }
.helptext li::marker { color: var(--line); }

.errorlist {
  margin: 0 0 6px; padding: 0; list-style: none;
  color: var(--danger); font-size: 13px;
}
.errorlist li { margin: 2px 0; }

/* 顶部整体报错（如用户名密码不匹配） */
.form-error {
  margin: 0 0 18px; padding: 11px 14px;
  border: 1px solid var(--danger-line); border-left-width: 3px;
  border-radius: var(--r);
  background: var(--danger-weak); color: var(--danger); font-size: 14px;
}
.form-error ul { margin: 0; padding-left: 1.1em; }

.actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 24px;
}
.actions .meta { margin: 0; }

/* 编辑器表单：宽一些的卡片 */
.formcard {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px;
}

/* --- 登录 / 注册 --------------------------------------------------------- */
.authwrap { max-width: 420px; margin: 24px auto 0; }
.authwrap h1 { font-size: 24px; text-align: center; }
.authwrap > .meta { text-align: center; margin: 0 0 22px; }
.authcard {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.authcard .actions { margin-top: 22px; }
.authcard button[type="submit"] { width: 100%; padding: 10px 16px; }
.authalt {
  margin: 16px 0 0; text-align: center;
  color: var(--muted); font-size: 14px;
}

/* --- 消息提示 ------------------------------------------------------------ */
.messages { list-style: none; padding: 0; margin: 0 0 22px; }
.msg {
  padding: 10px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: var(--r);
  background: var(--surface); font-size: 14.5px;
}
.msg.success { border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent); }
.msg.error   { border-color: var(--danger-line); background: var(--danger-weak); color: var(--danger); }
.msg.warning { border-color: var(--warn-line);   background: var(--warn-weak);   color: var(--warn); }

/* --- 词条正文（Markdown 渲染结果）--------------------------------------- */
.prose {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 6px 26px 26px;
  color: var(--fg-2);
}
.prose > :first-child { margin-top: 20px; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  margin: 28px 0 10px; color: var(--fg); line-height: 1.35;
}
.prose h1 { font-size: 24px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 17px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--muted); }
.prose a { text-decoration-color: var(--accent-line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

.prose blockquote {
  margin: 0 0 14px; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-line);
  color: var(--muted);
}

.prose code {
  padding: .12em .4em; border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--mono); font-size: .88em;
}
.prose pre {
  margin: 0 0 16px; padding: 14px 16px;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--surface-2);
  overflow-x: auto; line-height: 1.65;
}
.prose pre code { padding: 0; background: none; font-size: 13.5px; }

.prose table {
  width: 100%; margin: 0 0 16px;
  border-collapse: collapse; font-size: 14.5px;
}
.prose th, .prose td {
  padding: 8px 12px; border: 1px solid var(--line); text-align: left;
}
.prose th { background: var(--surface-2); font-weight: 600; color: var(--fg); }

.prose img { border-radius: var(--r); }

/* --- 分页 ---------------------------------------------------------------- */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 28px;
}
.pager a {
  padding: 7px 13px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--fg-2); font-size: 14px; text-decoration: none;
}
.pager a:hover { border-color: var(--accent-line); color: var(--accent); }
.pager .meta { font-variant-numeric: tabular-nums; }

/* --- 空状态 -------------------------------------------------------------- */
.empty {
  margin: 0; padding: 52px 24px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--muted);
}

/* --- 危险操作确认 -------------------------------------------------------- */
.confirmcard {
  background: var(--surface);
  border: 1px solid var(--danger-line); border-radius: var(--r-lg);
  border-left-width: 3px;
  padding: 20px 22px;
}
.confirmcard p { margin: 0 0 4px; }
.confirmcard .meta { margin: 0; }

/* --- 工具页 -------------------------------------------------------------- */
.toolfilter { display: flex; gap: 6px; flex: 1 1 260px; max-width: 380px; }
.toolfilter input {
  flex: 1; min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--fg);
  font-family: inherit; font-size: 14.5px;
}
.toolfilter input::placeholder { color: var(--muted); }
.toolfilter input:focus {
  outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--ring);
}
.toolfilter button {
  padding: 8px 14px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2); color: var(--fg-2);
  box-shadow: none; cursor: pointer;
}
.toolfilter button:hover { border-color: var(--accent-line); color: var(--accent); filter: none; }

.kindfilter { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--pill);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--fg-2); font-size: 13.5px; text-decoration: none;
}
.chip:hover { border-color: var(--accent-line); color: var(--accent); }
.chip.on {
  border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent);
  font-weight: 550;
}
.chip .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip.on .n, .chip:hover .n { color: var(--accent); }

/* --- 工具面板 ------------------------------------------------------------ */
.toolpanel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.toolpanel-head .meta { margin: 0; }

.tool {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 15px 18px; margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .15s ease;
}
.tool:hover { border-color: var(--accent-line); }
.tool-main { flex: 1 1 300px; min-width: 0; }

.tool-title { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.tool-title h3 { margin: 0; font-size: 16px; }
.tool-kind {
  padding: 1px 8px; border-radius: var(--pill);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font-size: 11.5px; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase;
}
.tool[data-kind="web"] .tool-kind {
  border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent);
}

.tool-target, .tool-creds { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.tool-target code, .tool-creds code {
  padding: .1em .45em; border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--mono); font-size: 13.5px; color: var(--fg-2);
  overflow-wrap: anywhere;
}
.tool-creds { gap: 16px; }
.cred { display: inline-flex; align-items: center; gap: 7px; }
.cred .k { color: var(--muted); font-size: 12.5px; }
.cred .secret { letter-spacing: .06em; }
/* 密码取回来之前占位，别让这一行的宽度跳来跳去。 */
.cred:not(.shown) .secret { min-width: 76px; }

.tool-note { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; }

.tool-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  flex-shrink: 0;
}
.tool-actions .btn { padding: 6px 14px; font-size: 14px; }
.tool-actions .linklike { font-size: 13.5px; }

.iconbtn {
  padding: 2px 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12px; line-height: 1.7;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.iconbtn:hover { border-color: var(--accent-line); color: var(--accent); }
.iconbtn.done { border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent); }

.tool-hint { margin: 14px 0 0; }

/* --- 控制台（浏览器内的终端 / 远程桌面）-------------------------------- */
/* 控制台要尽量占满视口：终端行数和远端画面都吃高度。 */
.console {
  display: flex; flex-direction: column;
  gap: 10px;
  height: calc(100vh - 190px); min-height: 380px;
}

.console-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.console-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.console-id strong { font-size: 15.5px; }
.console-id code {
  padding: .1em .45em; border-radius: var(--r-sm);
  background: var(--surface-2); font-family: var(--mono); font-size: 13px;
  overflow-wrap: anywhere;
}
.console-state { display: flex; align-items: center; gap: 10px; }

/* 连接状态灯 */
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
}
.dot[data-state="wait"] { background: var(--warn); }
.dot[data-state="on"]    { background: var(--accent); }
.dot[data-state="off"]   { background: var(--danger); }

.console-screen {
  flex: 1; min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #131315;
  overflow: hidden;
}
/* 远端画面自己带底色，留白反而碍事 */
.console-screen-rdp {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0; background: #0b0b0c;
  cursor: default;
}
.console-screen-rdp:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.console-screen-rdp canvas { display: block; }

/* 没存密码时问一次的小卡片 */
.console-auth {
  max-width: 380px;
  padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.console-auth .field { margin-bottom: 0; }
.console-auth .meta { margin: 0 0 14px; }

/* --- 窄屏 ---------------------------------------------------------------- */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .search { order: 5; width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .search input:focus { width: 100%; }
  .userbox { margin-left: auto; }
  .container { padding: 26px 16px 56px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 27px; }
  .prose { padding: 6px 18px 20px; }
  .tool { flex-direction: column; gap: 12px; }
  .tool-actions { width: 100%; }
  .toolfilter { max-width: none; }
  .console { height: calc(100vh - 210px); }
  .console-bar { gap: 8px; }
  .site-footer .inner { padding: 16px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
