/* ==========================================================================
   跨境导航站 — 前台样式
   深浅色双主题，主题由 <html data-theme> 决定（layout 头部内联脚本先行设定）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   视觉语言：集装箱航运
   跨境卖家的货真的躺在集装箱里过太平洋——配色与质感取自这个世界：
     港雾白（底）· 船壳蓝（墨/深色底）· 港湾蓝（交互）· 集装箱橙（签名色，克制使用）
   等宽字体承载「箱号/港口代码」语言；hero 是带瓦楞纹的船壳舱单板 + 航线图。
   -------------------------------------------------------------------------- */
:root {
  /* 港湾蓝：链接与交互主色，比 SaaS 亮蓝深而稳 */
  --primary: #175e8f;
  --primary-dark: #0f4a73;
  --primary-soft: #e2edf5;

  /* 集装箱橙：签名色。吃水线、主按钮、hover 强调，别处不用 */
  --accent: #e8551c;
  --accent-dark: #c74312;
  --accent-soft: #fdeae0;

  --bg: #f2f4f3;          /* 港雾白：冷调灰白 */
  --surface: #ffffff;
  --surface-2: #e9edec;
  --border: #dbe1df;
  --border-strong: #c3ccc9;

  --ink: #16232e;         /* 船壳蓝 */
  --ink-mid: #46586a;
  --ink-soft: #7c8b99;

  --ok: #0e8a5f;          /* 舷灯绿 */
  --warn: #b97a15;
  --danger: #d2402e;

  /* 船壳面板（hero 用，两种主题下都是深色船体） */
  --hull: #0f2233;
  --hull-2: #17334d;
  --hull-ink: #eef3f7;
  --hull-soft: #93a8bb;

  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Noto Sans Mono", monospace;

  --radius: 0.5rem;
  --radius-sm: 0.3125rem;
  --shadow: 0 1px 2px rgba(15, 34, 51, .06);
  --shadow-lg: 0 10px 26px rgba(15, 34, 51, .14);
  --shadow-hard: 4px 4px 0 rgba(15, 34, 51, .1);

  --page-w: 87.5rem;
  --rail-w: 18.75rem;
  --nav-h: 3.75rem;
}

:root[data-theme="dark"] {
  --primary: #5da4d8;
  --primary-dark: #3f8cc4;
  --primary-soft: #14293a;

  --accent: #ff6b2e;
  --accent-dark: #e8551c;
  --accent-soft: #33200f;

  --bg: #0c1620;          /* 夜航船体 */
  --surface: #13202c;
  --surface-2: #1a2937;
  --border: #24384a;
  --border-strong: #33495e;

  --ink: #e8edf1;
  --ink-mid: #a4b4c2;
  --ink-soft: #718393;

  --ok: #35c08e;
  --warn: #e0a33e;
  --danger: #ef6e5b;

  --hull: #0a1826;
  --hull-2: #122a40;
  --hull-ink: #eef3f7;
  --hull-soft: #8ba0b3;

  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 26px rgba(0, 0, 0, .5);
  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, .35);
}

/* ==========================================================================
   整站缩放
   全站尺寸均以 rem 表达（边框与阴影除外），因此只要调根字号就能整体等比缩放。

   两层叠加：
     自动 —— 根字号随视口流体变化：1280px 视口为 16px，3840px 为 23px，两端钳位。
             高分屏下字号、卡片、图标、容器宽度会一起变大，不再挤在中间一条。
     手动 —— --ui-scale 由用户在顶栏切换并存本地，叠乘在自动缩放之上，
             便于按个人视力与屏幕距离微调。

   斜率来源：(23 − 16) ÷ (3840 − 1280) = 0.2734% ，即 0.273vw；
   截距使 1280px 处恰为 16px，从而在 ≤1280px 的视口上与改造前完全一致。
   ========================================================================== */
html {
  font-size: calc(clamp(16px, 0.273vw + 12.5px, 23px) * var(--ui-scale, 1));
}

/* 断点仍按真实视口判断，不受根字号影响 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

/* 吃水线：全站顶端 3px 集装箱橙，船体水线的引用，也是品牌识别线 */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  z-index: 60;
  pointer-events: none;
}

/* 舱单式眉标：等宽大写宽字距，承载「箱号/港口代码」语言 */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
button { font-family: inherit; }

kbd {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.6875rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 0.25rem;
  padding: 1px 0.3125rem;
}

.skip-link {
  position: absolute; left: -62.4375rem; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 0.625rem 1rem;
}
.skip-link:focus { left: 0; }

/* ==================== 顶栏 ==================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--page-w); margin: 0 auto; height: 100%;
  padding: 0 1.25rem; display: flex; align-items: center; gap: 1.25rem;
}

.brand { display: flex; align-items: center; gap: 0.5625rem; flex: none; }
.brand-mark {
  /* 站标 = 一只集装箱橙的箱子，顶栏上唯一的橙色块 */
  width: 2rem; height: 2rem; border-radius: 0.375rem; flex: none;
  background: var(--accent);
  color: #fff; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.brand-text b { display: block; font-size: 0.9375rem; line-height: 1.2; letter-spacing: .5px; }
.brand-text i { display: block; font-size: 0.625rem; color: var(--ink-soft); font-style: normal; }

.topnav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav-item {
  padding: 0.375rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.875rem;
  color: var(--ink-mid); white-space: nowrap; transition: background .15s, color .15s;
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.topnav-item:hover { background: var(--surface-2); color: var(--primary); }
.topnav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.ti-dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--ok); }

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

.cmd-trigger {
  display: flex; align-items: center; gap: 0.625rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.375rem 0.625rem 0.375rem 0.75rem;
  color: var(--ink-soft); font-size: 0.8125rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cmd-trigger:hover { border-color: var(--primary); color: var(--ink-mid); }
.cmd-kbd {
  font-family: ui-monospace, monospace; font-size: 0.6875rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0.25rem; padding: 1px 0.375rem; color: var(--ink-soft);
}

.icon-btn {
  width: 2.125rem; height: 2.125rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-mid); font-size: 0.9375rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
/* 显示大小切换 */
.scale-wrap { position: relative; }
.scale-btn { font-weight: 700; letter-spacing: -.5px; }
.scale-pop {
  position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 0.375rem; min-width: 9rem;
}
.scale-pop-title {
  font-size: 0.6875rem; color: var(--ink-soft);
  padding: 0.25rem 0.5rem 0.375rem;
}
.scale-pop-sep { height: 1px; background: var(--border); margin: 0.375rem 0.25rem; }
.scale-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; border: none; background: transparent; cursor: pointer;
  padding: 0.4375rem 0.5rem; border-radius: var(--radius-sm);
  color: var(--ink-mid); font-size: 0.8125rem; text-align: left;
}
.scale-opt:hover { background: var(--surface-2); color: var(--primary); }
.scale-opt.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.scale-opt em { font-style: normal; color: var(--ink-soft); font-size: 0.6875rem; }
.scale-opt.active em { color: var(--primary); }

.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }
.nav-toggle { display: none; }

/* ==================== 首屏 ==================== */
/* 船壳舱单板：深色船体 + 瓦楞钢纹理（两种主题下都是深色，像货轮侧舷） */
.hero {
  position: relative;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, .028) 0, rgba(255, 255, 255, .028) 1px,
      transparent 1px, transparent 0.875rem),
    linear-gradient(160deg, var(--hull) 0%, var(--hull-2) 100%);
  padding: 2.375rem 1.25rem 0; color: var(--hull-ink);
}
.hero-inner { max-width: var(--page-w); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

.hero-eyebrow {
  color: var(--accent);
  display: flex; align-items: center; gap: 0.625rem;
  margin-bottom: 0.625rem;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .6;
}

.hero-title { font-size: 1.875rem; font-weight: 800; letter-spacing: 0.09em; }
.hero-sub { margin: 0.4375rem 0 1.375rem; font-size: 0.875rem; color: var(--hull-soft); text-align: center; }

.hero-meta {
  margin-top: 0.875rem; font-size: 0.8125rem; color: var(--hull-soft);
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: center;
}
.hero-meta .dot { opacity: .5; }
.hero-meta b { font-weight: 700; color: var(--hull-ink); }

/* ---- 航线图：签名元素 ----
   真实 UN/LOCODE 港口代码串在虚线航路上，对应本站覆盖的主要市场。
   航路虚线加载时向右流动一段后停住（reduced-motion 下静止）。 */
.route-strip {
  width: 100%; max-width: 50rem;
  margin-top: 1.75rem; padding: 0.875rem 0 1rem;
  border-top: 1px dashed color-mix(in srgb, var(--hull-soft) 35%, transparent);
  display: flex; align-items: flex-start; justify-content: space-between;
  position: relative;
}
.route-strip::before {
  /* 航路线：穿过所有港点的虚线 */
  content: "";
  position: absolute; left: 0.25rem; right: 0.25rem; top: 1.53125rem; height: 0;
  border-top: 2px dashed color-mix(in srgb, var(--accent) 75%, transparent);
  animation: route-flow 1.6s ease-out;
}
@keyframes route-flow {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .route-strip::before { animation: none; }
}
.route-port {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em;
  color: var(--hull-soft);
}
.route-port i {
  /* 港点：方形锚位，起点终点用橙色实心 */
  width: 0.5625rem; height: 0.5625rem; border-radius: 2px;
  background: var(--hull); border: 2px solid var(--accent);
  order: 2;
}
.route-port.home i { background: var(--accent); }
.route-port b { order: 1; color: var(--hull-ink); font-weight: 400; }
.route-port span { order: 3; font-family: inherit; font-size: 0.625rem; opacity: .75; }
.link-btn {
  background: rgba(255,255,255,.16); border: none; color: #fff;
  padding: 0.1875rem 0.75rem; border-radius: 1.25rem; cursor: pointer; font-size: 0.8125rem;
}
.link-btn:hover { background: rgba(255,255,255,.3); }
.hero-meta kbd { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); color: #fff; }

/* 搜索框 */
.search-app { width: 100%; max-width: 43.75rem; }
.search-tabs { display: flex; flex-wrap: wrap; gap: 0.1875rem; justify-content: center; margin-bottom: 0.6875rem; }
.search-tab {
  padding: 0.25rem 0.75rem; border-radius: 0.3125rem; font-size: 0.8125rem; cursor: pointer;
  color: rgba(255,255,255,.82); transition: background .15s, color .15s;
}
.search-tab:hover { background: rgba(255,255,255,.18); color: #fff; }
.search-tab.active { background: #fff; color: var(--primary); font-weight: 600; }

.search-box {
  display: flex; background: #fff; border-radius: 0.5rem; overflow: hidden;
  box-shadow: 0 8px 26px rgba(0,20,60,.24);
}
.search-box input {
  flex: 1; border: none; outline: none; padding: 0.875rem 1rem;
  font-size: 0.9375rem; color: #1f2430; background: #fff;
}
.search-box input::placeholder { color: #aeb5c2; }
.search-box button {
  /* 主动作按钮用签名橙 */
  border: none; background: var(--accent); color: #fff;
  padding: 0 2.125rem; font-size: 0.9375rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.search-box button:hover { background: var(--accent-dark); }

/* ==================== 公告条 ==================== */
.notice-wrap { max-width: var(--page-w); margin: 0 auto; padding: 1rem 1.25rem 0; }
.notice {
  display: flex; align-items: center; gap: 0.625rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5625rem 0.875rem; box-shadow: var(--shadow);
}
.notice-label {
  flex: none; background: color-mix(in srgb, var(--warn) 15%, transparent);
  color: var(--warn); border-radius: 0.25rem; padding: 2px 0.5625rem; font-size: 0.75rem; font-weight: 600;
}
.notice-list { position: relative; flex: 1; height: 1.3125rem; overflow: hidden; }
.notice-item {
  position: absolute; inset: 0; font-size: 0.8125rem; color: var(--ink-mid);
  opacity: 0; transition: opacity .4s; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.notice-item.show { opacity: 1; }

/* ==================== 页面骨架 ==================== */
.page {
  max-width: var(--page-w); margin: 0 auto; padding: 1.125rem 1.25rem 3rem;
  display: grid; grid-template-columns: minmax(0,1fr) var(--rail-w);
  gap: 1.25rem; align-items: start;
}
.page-narrow, .page-tool { grid-template-columns: minmax(0,1fr) 16.25rem; }
.page-narrow { grid-template-columns: minmax(0,1fr); max-width: 62.5rem; }
.main-col { min-width: 0; }

.block { margin-bottom: 1.875rem; }
.block-head {
  display: flex; align-items: baseline; gap: 0.625rem; flex-wrap: wrap;
  margin-bottom: 0.875rem; padding-bottom: 0.625rem; border-bottom: 2px solid var(--border);
}
.block-head h2 { font-size: 1.125rem; }
.block-head span { font-size: 0.75rem; color: var(--ink-soft); }
.block-more { margin-left: auto; font-size: 0.8125rem; color: var(--primary); }
.block-more:hover { text-decoration: underline; }

/* ==================== 分区与卡片 ==================== */
/* 分区之间留足空白，让眼睛能把 27 个分区切成一块块来读，而不是一片连续的卡海 */
.section { margin-bottom: 2.25rem; scroll-margin-top: calc(var(--nav-h) + 0.75rem); }
.section-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6875rem; }
/* 分区图标由实心色块改成细色条：颜色仍能帮你定位分区，但不再和卡片抢注意力 */
.sec-icon {
  width: 0.1875rem; height: 1rem; border-radius: 2px; flex: none;
  font-size: 0; text-indent: -9999px; overflow: hidden;
  background: var(--c, var(--primary));
}
.section-title { font-size: 1rem; }
.section-count {
  /* 数量牌：等宽「× N」，像箱位统计 */
  font-family: var(--font-mono);
  font-size: 0.6875rem; color: var(--ink-soft); background: var(--surface-2);
  border-radius: 0.25rem; padding: 1px 0.5rem;
}
.section-count::before { content: "× "; opacity: .6; }
.section-region { font-size: 0.6875rem; color: var(--ink-soft); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.625rem; }

/* 降噪要点：几百张卡片同时出现时，静止态必须"退后"，只有被指向的那张才"上前"。
   因此静止态不给阴影、边框极淡、品牌色降饱和；悬停时才恢复满色并浮起。 */
.card {
  position: relative;
  background: var(--surface); border: 1px solid transparent;
  border-radius: var(--radius); padding: 0.9375rem 0.625rem 0.8125rem; text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.card:hover {
  /* 硬投影：像抬起一块钢板，工业感的悬停语言 */
  transform: translate(-2px, -2px); box-shadow: var(--shadow-hard);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 0.6875rem; display: block; margin: 0 auto 0.5625rem;
  object-fit: contain; background: var(--surface-2);
  /* 静止时略压饱和，让整片 logo 墙的色彩趋于统一，悬停恢复原色。
     只需要削掉最扎眼的那一层，压太狠会让品牌变得难认、页面发灰发旧，
     降噪的主力是无阴影、悬停才出角标、图标浅底这几项，这里点到为止。 */
  filter: saturate(.82);
  transition: filter .15s;
}
.card:hover .card-icon { filter: none; }
.card-icon-text {
  color: #fff; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: var(--c, var(--ink-soft));
}
.card-name {
  display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc {
  display: block; font-size: 0.75rem; color: var(--ink-soft); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card:hover .card-name { color: var(--primary); }

/* 收费标记只在悬停时露出：浏览时它是噪音，真要点进去时才是信息 */
.card-tag {
  position: absolute; top: 0.4375rem; right: 0.4375rem;
  font-size: 0.625rem; padding: 0 0.3125rem; border-radius: 0.25rem;
  background: var(--surface-2); color: var(--ink-soft);
  opacity: 0; transition: opacity .15s;
}
.card:hover .card-tag { opacity: 1; }
.tag-free { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tag-freemium { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }

.empty-state { display: none; text-align: center; color: var(--ink-soft); padding: 3.125rem 0; }

/* ---- 今日跨境 ---- */
.news-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.news-item {
  display: flex; align-items: baseline; gap: 0.625rem;
  padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--surface-2); }
.news-pin {
  flex: none; font-size: 0.6875rem; padding: 0 0.4375rem; border-radius: 0.25rem;
  background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger);
}
.news-title {
  flex: 1; min-width: 0; font-size: 0.875rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.news-item:hover .news-title { color: var(--primary); }
.news-trans {
  font-style: normal; font-size: 0.625rem; margin-left: 0.375rem;
  padding: 0 0.25rem; border-radius: 0.1875rem; vertical-align: 1px;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary);
}
.news-meta { flex: none; font-size: 0.75rem; color: var(--ink-soft); }
.news-list-page .news-title { white-space: normal; }

/* ---- 卡片外层与详情入口 ---- */
.card-wrap { position: relative; display: flex; flex-direction: column; }
.card-wrap > .card { flex: 1; }
.card-more {
  position: absolute; left: 50%; bottom: 0.375rem; transform: translateX(-50%);
  font-size: 0.6875rem; color: var(--primary); background: var(--primary-soft);
  border-radius: 0.75rem; padding: 0.0625rem 0.625rem;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.card-wrap:hover .card-more,
.card-more:focus-visible { opacity: 1; pointer-events: auto; }
.card-wrap:hover .card-desc { opacity: 0; }
.card-desc { transition: opacity .15s; }

/* ---- 详情页 ---- */
.site-hero-logo {
  width: 3.25rem; height: 3.25rem; border-radius: 0.8125rem; flex: none;
  object-fit: contain; background: #fff; padding: 0.25rem;
}
.site-hero-btn { margin-left: auto; flex: none; }
.site-url { color: var(--primary); word-break: break-all; }
.site-url:hover { text-decoration: underline; }
.stage-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: flex-end; }
.stage-badge {
  font-size: 0.75rem; padding: 0.0625rem 0.625rem; border-radius: 0.75rem;
  background: color-mix(in srgb, var(--c, var(--primary)) 13%, transparent);
  color: var(--c, var(--primary));
}
.stage-badge:hover { background: color-mix(in srgb, var(--c, var(--primary)) 22%, transparent); }
.site-detail-body { font-size: 0.875rem; line-height: 1.9; color: var(--ink-mid); }
.site-detail-body h2, .site-detail-body h3 { color: var(--ink); margin: 1.125rem 0 0.5rem; font-size: 1rem; }
.site-detail-body p { margin: 0.5rem 0; }
.site-detail-body ul, .site-detail-body ol { padding-left: 1.375rem; margin: 0.5rem 0; }
.site-detail-body a { color: var(--primary); }
.site-detail-body a:hover { text-decoration: underline; }

/* ==========================================================================
   卡片视图密度
   同一批数据三种读法，存本地：
     comfort 舒适 —— 图标+名称+描述，适合闲逛发现
     compact 紧凑 —— 去掉描述、缩小图标，一屏能看更多
     list    列表 —— 每行一条，静止态几乎无边框，最安静的扫读模式
   ========================================================================== */

/* ---- 紧凑 ---- */
:root[data-view="compact"] .grid { grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr)); gap: 0.5rem; }
:root[data-view="compact"] .card { padding: 0.625rem 0.375rem 0.5625rem; }
:root[data-view="compact"] .card-icon { width: 2rem; height: 2rem; margin-bottom: 0.375rem; border-radius: 0.5rem; }
:root[data-view="compact"] .card-desc { display: none; }
:root[data-view="compact"] .card-name { font-size: 0.75rem; }

/* ---- 列表 ---- */
:root[data-view="list"] .grid {
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 0.125rem 1.25rem;
}
:root[data-view="list"] .card {
  display: flex; align-items: center; gap: 0.625rem; text-align: left;
  padding: 0.4375rem 0.5rem; border-radius: var(--radius-sm); background: transparent;
}
:root[data-view="list"] .card:hover { transform: none; box-shadow: none; background: var(--surface); }
:root[data-view="list"] .card-icon {
  width: 1.5rem; height: 1.5rem; margin: 0; border-radius: 0.3125rem; flex: none;
}
:root[data-view="list"] .card-name { flex: none; max-width: 45%; }
:root[data-view="list"] .card-desc { margin-top: 0; flex: 1; text-align: right; }
:root[data-view="list"] .card-tag { position: static; opacity: 1; flex: none; }
/* 列表视图：详情钮靠行尾垂直居中，描述保持可见（居中悬浮会压住文字） */
:root[data-view="list"] .card-more {
  left: auto; right: 0.5rem; bottom: 50%; transform: translateY(50%);
}
:root[data-view="list"] .card-wrap:hover .card-desc { opacity: 1; }
:root[data-view="list"] .card-wrap:hover .card { padding-right: 3.25rem; }

/* ==================== 工具卡片 ==================== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.625rem, 1fr)); gap: 0.625rem; }
.tool-grid-lg { grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr)); }

.tool-card {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tool-card:hover {
  transform: translate(-2px, -2px); box-shadow: var(--shadow-hard);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
/* 成排出现的图标一律改用「浅色底 + 同色字」：色彩编码保留，
   但一屏 20 多个高饱和实心块的压迫感消失。--c 由模板以内联变量传入。 */
.tool-icon {
  width: 2.375rem; height: 2.375rem; border-radius: 0.625rem; flex: none;
  font-size: 0.9375rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c, var(--primary)) 13%, transparent);
  color: var(--c, var(--primary));
}
/* 二级页头只有孤零零一个图标，实心反而更利落（背景由模板内联给出） */
/* hero 深色渐变上的大图标：实底白字。淡底同色字的常规款在深蓝底上会糊成一团 */
.tool-icon-lg {
  width: 3.25rem; height: 3.25rem; font-size: 1.25rem; border-radius: 0.8125rem;
  background: var(--c, var(--primary)); color: #fff;
}
.tool-body { min-width: 0; }
.tool-name { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.tool-summary { display: block; font-size: 0.75rem; color: var(--ink-soft); line-height: 1.55; }
.tool-card:hover .tool-name { color: var(--primary); }

/* ==================== 工作流阶段卡片 ==================== */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.875rem, 1fr)); gap: 0.625rem; }
.stage-card {
  display: flex; gap: 0.6875rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8125rem; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.stage-card:hover {
  transform: translate(-2px, -2px); box-shadow: var(--shadow-hard);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.stage-icon {
  width: 2.125rem; height: 2.125rem; border-radius: 0.5625rem; flex: none;
  font-size: 0.875rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c, var(--primary)) 13%, transparent);
  color: var(--c, var(--primary));
}
.stage-body { min-width: 0; }
.stage-name { display: flex; align-items: center; gap: 0.4375rem; font-size: 0.875rem; font-weight: 600; }
.stage-name em {
  font-style: normal; font-size: 0.6875rem; color: var(--ink-soft);
  background: var(--surface-2); border-radius: 0.5625rem; padding: 0 0.4375rem;
}
.stage-desc { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-top: 2px; }

/* 阶段页顶部横向切换 */
.stage-tabs-wrap { border-bottom: 1px solid var(--border); background: var(--surface); }
.stage-tabs {
  max-width: var(--page-w); margin: 0 auto; padding: 0 1.25rem;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tab {
  padding: 0.6875rem 0.875rem; font-size: 0.8125rem; color: var(--ink-mid);
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.stage-tab:hover { color: var(--primary); }
.stage-tab.active { color: var(--tab-color, var(--primary)); border-bottom-color: var(--tab-color, var(--primary)); font-weight: 600; }

/* ==================== 二级页头 ==================== */
.sub-hero {
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, .022) 0, rgba(255, 255, 255, .022) 1px,
      transparent 1px, transparent 0.875rem),
    linear-gradient(160deg, var(--hull), var(--hull-2));
  color: var(--hull-ink); padding: 1.625rem 1.25rem 1.875rem;
}
.sub-hero-inner { max-width: var(--page-w); margin: 0 auto; }
.sub-hero h1 { font-size: 1.4375rem; font-weight: 800; letter-spacing: 0.06em; }
.sub-hero p { margin: 0.4375rem 0 0; font-size: 0.8125rem; color: var(--hull-soft); max-width: 47.5rem; line-height: 1.7; }
.crumb { font-size: 0.75rem; opacity: .75; margin-bottom: 0.75rem; }
.crumb a:hover { text-decoration: underline; }
.crumb span { margin: 0 0.3125rem; opacity: .6; }
.tool-hero { display: flex; align-items: center; gap: 0.9375rem; }

/* ==================== 右栏 / 侧栏 ==================== */
.rail, .tool-side {
  position: sticky; top: calc(var(--nav-h) + 1.125rem);
  display: flex; flex-direction: column; gap: 0.875rem;
}
.widget, .side-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.widget-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6875rem 0.875rem; border-bottom: 1px solid var(--border);
}
.widget-head h4 { font-size: 0.875rem; }
.widget-head small { font-size: 0.6875rem; color: var(--ink-soft); font-weight: 400; }
.widget-body { padding: 0.375rem 0.875rem 0.75rem; }

.rate-row, .clock-row, .cd-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4375rem 0; border-bottom: 1px dashed var(--border); font-size: 0.8125rem;
}
.rate-row:last-child, .clock-row:last-child, .cd-row:last-child { border-bottom: none; }
.rate-cur, .clock-city, .cd-name { color: var(--ink-mid); }
.rate-val, .clock-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 0.6875rem; color: var(--ink-soft); margin-left: 0.375rem; font-weight: 400; }
.cd-days { font-weight: 700; color: var(--danger); font-size: 1rem; font-variant-numeric: tabular-nums; }
.cd-days small { font-size: 0.6875rem; color: var(--ink-soft); font-weight: 400; margin-left: 2px; }

.widget-msg { padding: 0.875rem 0; text-align: center; color: var(--ink-soft); font-size: 0.75rem; line-height: 1.7; }
.widget-retry {
  margin-top: 0.5rem; border: 1px solid var(--border); background: var(--surface);
  border-radius: 0.3125rem; padding: 0.25rem 0.875rem; font-size: 0.75rem; color: var(--primary); cursor: pointer;
}
.widget-retry:hover { border-color: var(--primary); }

.side-box { padding: 0.875rem; }
.side-box h3 { font-size: 0.8125rem; margin-bottom: 0.625rem; color: var(--ink-mid); }
.side-link {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm); font-size: 0.8125rem; color: var(--ink-mid);
}
.side-link:hover { background: var(--surface-2); color: var(--primary); }
.side-link.current { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-icon {
  width: 1.375rem; height: 1.375rem; border-radius: 0.375rem; flex: none;
  font-size: 0.6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c, var(--primary)) 13%, transparent);
  color: var(--c, var(--primary));
}

/* ==================== 指令台 ==================== */
.cmd-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 18, 35, .5); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem;
}
.cmd-panel {
  width: 100%; max-width: 40rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 0.875rem;
  box-shadow: 0 24px 70px rgba(0, 10, 40, .4); overflow: hidden;
  display: flex; flex-direction: column; max-height: 70vh;
}
.cmd-input-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); }
.cmd-input-row input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 1rem; color: var(--ink);
}
.cmd-input-row input::placeholder { color: var(--ink-soft); }
.cmd-hint-icon { color: var(--ink-soft); font-size: 1rem; }
.cmd-esc { font-size: 0.6875rem; color: var(--ink-soft); border: 1px solid var(--border); border-radius: 0.25rem; padding: 1px 0.375rem; }

.cmd-results { overflow-y: auto; padding: 0.375rem; }
.cmd-group-title { font-size: 0.6875rem; color: var(--ink-soft); padding: 0.5rem 0.625rem 0.25rem; letter-spacing: .5px; }
.cmd-item {
  display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm); cursor: pointer;
}
.cmd-item.active { background: var(--primary-soft); }
.cmd-item-icon {
  width: 1.75rem; height: 1.75rem; border-radius: 0.4375rem; flex: none; object-fit: contain;
  background: var(--surface-2); color: #fff; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cmd-item-body { min-width: 0; flex: 1; }
.cmd-item-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item-desc { font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item-meta { font-size: 0.6875rem; color: var(--ink-soft); flex: none; }
.cmd-empty { padding: 2.125rem 1rem; text-align: center; color: var(--ink-soft); font-size: 0.8125rem; }
/* ---- 指令台问答视图 ---- */
.cmd-ask-entry {
  display: flex; align-items: center; gap: 0.625rem;
  margin: 0.375rem; padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm); cursor: pointer;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  font-size: 0.875rem; color: var(--ink);
}
.cmd-ask-entry:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.cmd-ask-entry b { color: var(--primary); font-weight: 600; }
.cmd-ask-entry kbd { margin-left: auto; }
.cmd-ask-icon { color: var(--primary); }

.cmd-ask-view { padding: 0.625rem 0.875rem; }
.cmd-ask-q {
  font-size: 0.8125rem; color: var(--ink-soft);
  padding-bottom: 0.5rem; border-bottom: 1px dashed var(--border); margin-bottom: 0.625rem;
}
.cmd-ask-q::before { content: "问："; color: var(--primary); }
.cmd-ask-a {
  font-size: 0.875rem; line-height: 1.85; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.cmd-ask-err {
  margin-top: 0.5rem; font-size: 0.8125rem; color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem;
}
.cmd-ask-note {
  margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px dashed var(--border);
  font-size: 0.6875rem; color: var(--ink-soft);
}
.cmd-ask-note a { color: var(--primary); }

.cmd-footer {
  display: flex; gap: 0.875rem; padding: 0.5625rem 1rem; border-top: 1px solid var(--border);
  font-size: 0.6875rem; color: var(--ink-soft);
}
.cmd-calc {
  padding: 0.75rem 0.875rem; margin: 0.375rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.cmd-calc b { font-size: 1.125rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.cmd-calc span { font-size: 0.75rem; color: var(--ink-mid); display: block; margin-top: 2px; }

/* ==================== 工具页 UI ==================== */
.tool-mount { min-height: 12.5rem; }
.tool-loading { padding: 3.75rem; text-align: center; color: var(--ink-soft); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.125rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.panel h3 { font-size: 0.9375rem; margin-bottom: 0.875rem; }
.panel-note { font-size: 0.75rem; color: var(--ink-soft); line-height: 1.75; margin: 0.625rem 0 0; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr)); gap: 0.875rem; }
.field label { display: block; font-size: 0.75rem; color: var(--ink-mid); margin-bottom: 0.3125rem; }
.field-hint { font-size: 0.6875rem; color: var(--ink-soft); margin-top: 0.25rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.5625rem 0.6875rem; font-size: 0.875rem; outline: none;
  background: var(--surface); color: var(--ink); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field-row { display: flex; gap: 0.5rem; }
.field-row input { flex: 1; }
.field-suffix {
  display: flex; align-items: center; padding: 0 0.625rem; font-size: 0.75rem;
  color: var(--ink-soft); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 2px; }
.seg button {
  border: none; background: transparent; color: var(--ink-mid);
  padding: 0.3125rem 0.8125rem; font-size: 0.8125rem; border-radius: 0.3125rem; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr)); gap: 0.75rem; }
.result-tile {
  background: var(--surface-2); border-radius: var(--radius); padding: 0.875rem;
  border: 1px solid var(--border);
}
.result-tile .rt-label { font-size: 0.75rem; color: var(--ink-soft); }
.result-tile .rt-value {
  font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums;
  margin-top: 0.1875rem; line-height: 1.25;
}
.result-tile.good .rt-value { color: var(--ok); }
.result-tile.bad .rt-value { color: var(--danger); }
.result-tile .rt-sub { font-size: 0.6875rem; color: var(--ink-soft); margin-top: 2px; }

.breakdown { margin-top: 1rem; }
.bd-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0; border-bottom: 1px dashed var(--border); font-size: 0.8125rem;
}
.bd-row:last-child { border-bottom: none; }
.bd-row.total { font-weight: 700; border-top: 2px solid var(--border); margin-top: 0.25rem; }
.bd-label { color: var(--ink-mid); display: flex; align-items: center; gap: 0.4375rem; }
.bd-bar { height: 0.375rem; border-radius: 0.1875rem; background: var(--primary); opacity: .75; }
.bd-value { font-variant-numeric: tabular-nums; }

.btn-primary, .btn-plain {
  border: none; border-radius: var(--radius-sm); padding: 0.5625rem 1.25rem;
  font-size: 0.875rem; cursor: pointer; display: inline-block;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-plain { background: var(--surface-2); color: var(--ink-mid); border: 1px solid var(--border); }
.btn-plain:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.3125rem 0.75rem; font-size: 0.75rem; }

.notice-box {
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: var(--radius); padding: 0.875rem 1rem; font-size: 0.8125rem; line-height: 1.8;
}
.notice-box b { display: block; margin-bottom: 0.25rem; }
.notice-box p { margin: 0; color: var(--ink-mid); }

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-item {
  display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm); cursor: pointer; transition: background .15s;
}
.check-item:hover { background: var(--surface-2); }
.check-item input { margin-top: 0.1875rem; flex: none; }
.check-item.done .ci-title { text-decoration: line-through; color: var(--ink-soft); }
.ci-title { font-size: 0.8125rem; font-weight: 600; }
.ci-desc { font-size: 0.75rem; color: var(--ink-soft); margin-top: 2px; }

.tz-bar { display: flex; height: 1.625rem; border-radius: 0.3125rem; overflow: hidden; border: 1px solid var(--border); }
.tz-cell { flex: 1; font-size: 0.5625rem; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.tz-cell.work { background: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--ink); }
.tz-cell.overlap { background: var(--ok); color: #fff; font-weight: 700; }

.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.out-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem; font-size: 0.8125rem; max-height: 20rem; overflow: auto;
  white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace;
}

/* ==================== 占位页 ==================== */
.placeholder {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3.75rem 1.25rem; text-align: center; box-shadow: var(--shadow);
}
.placeholder-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.placeholder h2 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.placeholder p { color: var(--ink-soft); font-size: 0.8125rem; margin: 0; }
.placeholder-actions { margin-top: 1.375rem; display: flex; gap: 0.625rem; justify-content: center; }
.placeholder-nav {
  margin-top: 1.125rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.125rem;
}
.placeholder-nav h3 { font-size: 0.875rem; margin-bottom: 0.625rem; }
.placeholder-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.placeholder-links a {
  background: var(--surface-2); border-radius: 0.3125rem; padding: 0.3125rem 0.875rem;
  font-size: 0.8125rem; color: var(--ink-mid);
}
.placeholder-links a:hover { background: var(--primary-soft); color: var(--primary); }

/* ==================== 页脚 ==================== */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 1.875rem 1.25rem 1.375rem; }
.footer-inner { max-width: var(--page-w); margin: 0 auto; }
.footer-cols { display: grid; grid-template-columns: 1.8fr repeat(4, 1fr); gap: 1.625rem; }
.footer-col h4 { font-size: 0.875rem; margin-bottom: 0.75rem; }
.footer-col a { display: block; font-size: 0.8125rem; color: var(--ink-soft); padding: 0.1875rem 0; }
.footer-col a:hover { color: var(--primary); }
.footer-about p { font-size: 0.75rem; color: var(--ink-soft); line-height: 1.8; margin: 0.625rem 0 0; }
.footer-stat b { color: var(--ink-mid); }
.footer-bottom {
  margin-top: 1.5rem; padding-top: 0.9375rem; border-top: 1px solid var(--border);
  font-size: 0.75rem; color: var(--ink-soft); line-height: 1.9;
}
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--primary); }

/* ==================== 回到顶部 ==================== */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-mid); font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s; z-index: 60;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { color: var(--primary); border-color: var(--primary); }

/* ==================== 响应式 ==================== */
@media (max-width: 1180px) {
  .page, .page-narrow, .page-tool { grid-template-columns: minmax(0,1fr); }
  .rail, .tool-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail .widget, .tool-side .side-box { flex: 1; min-width: 16.25rem; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .topnav {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-wrap: wrap; padding: 0.625rem; gap: 0.375rem; box-shadow: var(--shadow-lg);
  }
  .topnav.open { display: flex; }
  .nav-toggle { display: flex; }
  .cmd-trigger span { display: none; }
  .cmd-trigger { padding: 0.375rem 0.625rem; }
  .hero { padding: 1.625rem 1rem 1.5rem; }
  .hero-title { font-size: 1.375rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
  .card { padding: 0.75rem 0.375rem 0.625rem; }
  .card-icon { width: 2.375rem; height: 2.375rem; }
  .tool-grid, .tool-grid-lg, .stage-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 0.875rem 0.875rem 2rem; }
  .notice-wrap { padding: 0.75rem 0.875rem 0; }
  .cmd-mask { padding: 6vh 0.625rem 0.625rem; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}
