:root {
  /* 黑金主题 - 移动端优化版 */
  --bg: #000000;
  --bg-2: #121212;
  --text: #ffffff;
  --muted: #999999;
  --line: #3a3428;
  --line-light: rgba(212, 175, 55, 0.15);

  /* 金色主题 */
  --accent: #d4a356;
  --gold: #d4a356;
  --gold-light: #e4c76a;
  --gold-ink: #000000;
  --lime: #d4a356;
  --lime-ink: #000000;

  /* 状态颜色 */
  --fresh: #d4a356;
  --stale: #e0b44a;
  --off: #c45c5c;

  /* 卡片和阴影 */
  --card: #1a1a1a;
  --card-hover: #1c1a16;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.3);

  /* 金色辉光 */
  --gold-glow: rgba(212, 175, 55, 0.25);
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0; min-height: 100%;
  background:
    radial-gradient(420px 280px at 90% -8%, rgba(212, 175, 55, 0.08), transparent 60%),
    radial-gradient(380px 240px at 0% 20%, rgba(228, 199, 106, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei UI", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; font-synthesis: none; }
a { color: var(--lime); text-decoration: none; }

.phone {
  width: min(480px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom));
}

.param-toggle { position: relative; display: inline-flex; width: 50px; height: 28px; align-items: center; }
.param-toggle input[type="checkbox"] { position: absolute; inset: 0; z-index: 1; width: 50px; min-width: 50px; height: 28px; min-height: 28px; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.param-toggle-track { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: #37393e; box-shadow: inset 0 2px 5px rgba(0,0,0,.35); transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; pointer-events: none; }
.param-toggle-track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #f4f0e7; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .18s ease, background .18s ease; }
.param-toggle input:checked + .param-toggle-track { border-color: #d4a356; background: linear-gradient(135deg, #e4c76a, #c58b3d); box-shadow: 0 0 14px rgba(212,163,86,.22), inset 0 1px 2px rgba(255,255,255,.25); }
.param-toggle input:checked + .param-toggle-track::before { transform: translateX(22px); background: #fff8e6; }
.param-toggle input:focus-visible + .param-toggle-track { outline: 3px solid rgba(212,163,86,.4); outline-offset: 3px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 6; margin: -12px -16px 18px; padding: 12px 16px;
  background: rgba(12, 13, 16, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 14px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 18px; cursor: pointer;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }

.kicker { color: var(--muted); font-size: 12px; margin: 0 0 4px; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-value {
  font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero-value small { font-size: 16px; color: var(--muted); font-weight: 500; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(212, 175, 55, 0.12); color: var(--lime);
  border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 500; margin-top: 10px;
}
.lamp { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.FRESH {
  background: var(--fresh);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 0 8px rgba(212, 175, 55, 0.4);
}
.STALE {
  background: var(--stale);
  box-shadow: 0 0 0 3px rgba(224, 180, 74, 0.18);
}
.OFFLINE {
  background: var(--off);
  box-shadow: 0 0 0 3px rgba(196, 92, 92, 0.18);
}
.lamp.state-running { background: #31d17c; box-shadow: 0 0 0 3px rgba(49, 209, 124, 0.18); }
.lamp.state-paused { background: #e7b44d; box-shadow: 0 0 0 3px rgba(231, 180, 77, 0.18); }
.lamp.state-stopped { background: #ff5d5d; box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.18); }

.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }

.dots { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
.dot {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--lime-ink); font-weight: 600; font-size: 13px;
  background: var(--lime);
}
.dot.alt { background: #23262e; color: #ffffff; }
.dot.more { background: var(--card); color: var(--text); border: 1px solid var(--line); }

.glass {
  border-radius: 22px; padding: 18px;
  background: linear-gradient(160deg, #1c1f28 0%, #14161c 70%);
  color: #fff; border: 1px solid var(--line);
  position: relative; overflow: hidden; min-height: 148px;
}
.glass::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
}
.glass .sym { font-size: 15px; font-weight: 500; opacity: .92; }
.glass .amt { font-size: 30px; font-weight: 600; margin-top: 28px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.glass .sub { margin-top: 6px; font-size: 13px; opacity: .85; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}
.bars {
  display: flex; align-items: flex-end; gap: 8px; height: 92px; padding: 8px 4px 0;
}
.bars i {
  flex: 1; display: block; border-radius: 8px 8px 4px 4px;
  background: var(--lime);
  min-height: 8px;
}
.bars i:nth-child(odd) { background: rgba(212, 175, 55, 0.35); }
.row { color: var(--muted); font-size: 13px; line-height: 1.55; padding: 6px 0; }
.param-account { margin: 6px 0 10px; }
.param-account-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 6px; padding:10px; border:1px solid rgba(180,255,40,.35); border-radius:10px; }
.param-account-actions strong { color:#d7ff45; }
.param-readback { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 3px 0 0 8px; padding: 8px; border-left: 2px solid var(--green, #25c77a); background: rgba(37, 199, 122, .07); font-size: 12px; }
.param-readback strong, .param-readback small { width: 100%; }
.param-readback strong { color: var(--green, #25c77a); }
.param-readback small { color: var(--muted); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card); border-radius: 18px; padding: 16px; min-height: 92px;
  border: 1px solid var(--line);
}
.tile .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; margin-bottom: 10px; }
.tile.lilac .ico { background: rgba(139, 128, 255, 0.18); }
.tile.sky .ico { background: rgba(110, 168, 255, 0.16); }
.tile.dark {
  background: #101218; color: #f6f3ff;
}
.tile.dark .muted { color: #b7b0c9; }
.tile.gray { background: #1b1e26; }
.tile b { display: block; font-size: 15px; font-weight: 600; }

.goal {
  background: var(--card); border-radius: 20px; padding: 18px; border: 1px solid var(--line);
}
.goal .amt { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: #23262e; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; background: var(--lime); }

.list { background: var(--card); border-radius: 20px; border: 1px solid var(--line); overflow: hidden; }
.list a, .list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border: 0; background: transparent; color: inherit; text-align: left;
  border-bottom: 1px solid var(--line); font-weight: 500; cursor: pointer;
}
.list a:last-child, .list button:last-child { border-bottom: 0; }
.list .ico {
  width: 34px; height: 34px; border-radius: 12px; background: rgba(212, 175, 55, 0.14);
  display: grid; place-items: center; margin-right: 10px;
}
.list .left { display: flex; align-items: center; }

.who {
  display: flex; gap: 14px; align-items: center; margin: 8px 0 18px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--lime);
  display: grid; place-items: center; color: var(--lime-ink); font-weight: 600; font-size: 22px;
}

.tabbar {
  position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 8;
  display: flex; gap: 6px;
  background: rgba(23, 21, 19, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.tabbar a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 10px 4px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a.active {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; margin-bottom: 14px;
  background: var(--gold);
  color: var(--gold-ink);
  display: grid; place-items: center;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.tabs { display: flex; gap: 8px; margin: 12px 0; }
form { display: grid; gap: 10px; }
input, select {
  width: 100%; min-height: 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 16px; /* 防止iOS自动缩放 */
  transition: all 0.2s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: var(--card-hover);
}
button.primary, .auth button.primary {
  min-height: 48px;
  background: var(--gold);
  color: var(--gold-ink);
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
}
button.primary:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(212, 175, 55, 0.3);
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}
button.ghost:active {
  background: var(--card-hover);
}
.banner {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.err, .note.err { color: var(--off); min-height: 1.2em; font-size: 13px; }
.note { min-height: 1.2em; font-size: 13px; white-space: pre-wrap; }
.note.ok {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
}
.empty { color: var(--muted); padding: 18px; text-align: center; }
.check { display: flex; gap: 8px; align-items: center; padding: 8px 0; font-size: 14px; }
.param-grid { display: grid; gap: 8px; max-height: 46vh; overflow: auto; padding: 4px 0 8px; }
.param-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.param-field input { width: 100%; }
button.danger {
  background: var(--off);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(196, 92, 92, 0.25);
  transition: all 0.2s ease;
}
button.danger:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(196, 92, 92, 0.3);
}
button.danger:disabled { opacity: .45; }
button.tiny { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.pos-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pos-row:last-of-type { border-bottom: 0; }
.file-btn { display: grid; place-items: center; cursor: pointer; }
.popup-kind { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.popup-kind input[type="number"] { width: 72px; }
.notify-overlay { position: fixed; inset: 0; background: rgba(6, 7, 10, 0.62); display: grid; place-items: center; z-index: 80; padding: 20px; cursor: pointer; }
.notify-modal { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; cursor: default; }
.notify-kind { font-size: 12px; font-weight: 600; color: var(--lime); margin-bottom: 8px; }
.notify-modal p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.notify-modal button { width: 100%; }

/* Mobile dashboard */
.mobile-dashboard-hero {
  background: linear-gradient(145deg, #20252d 0%, #15181e 72%); border: 1px solid var(--line);
  border-radius: 26px; padding: 20px; box-shadow: 0 20px 45px rgba(0,0,0,.22);
}
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-head h2 { margin: 0; font-size: 20px; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid rgba(212, 175, 55, 0.18); border-radius: 999px; color: var(--lime); font-size: 11px; white-space: nowrap; }
.mobile-dashboard-hero .hero-value { margin-top: 28px; font-size: clamp(36px, 11vw, 52px); }
.hero-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; color: #aeb7c5; font-size: 12px; }
.mobile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mobile-metrics article { min-width: 0; padding: 13px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.mobile-metrics span, .mobile-metrics small { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-metrics strong { display: block; margin: 9px 0 3px; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-metrics strong.up, .mobile-account-head b.up { color: var(--gold); }
.mobile-metrics strong.down, .mobile-account-head b.down { color: var(--off); }
.mobile-metrics strong.flat, .mobile-account-head b.flat { color: var(--text); }
.mobile-section { margin-top: 24px; }
.risk-account-card { margin-bottom: 10px; }
.risk-account-card.is-focused { border-color: rgba(212, 175, 55, .62); box-shadow: 0 0 0 1px rgba(212, 175, 55, .12); }
.section-head a { color: var(--lime); font-size: 12px; font-weight: 600; }
.mobile-risk-card { background: linear-gradient(160deg, rgba(212, 175, 55, 0.10), rgba(23,25,31,.9) 55%); border: 1px solid rgba(212, 175, 55, 0.14); border-radius: 20px; padding: 4px 16px; }
.risk-mini-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.risk-mini-row:last-child { border-bottom: 0; }
.risk-mini-row strong, .risk-mini-row span { display: block; }
.risk-mini-row span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.risk-mini-row .lamp { margin-right: 5px; }
.quick-risk { flex: 0 0 auto; min-width: 58px; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 600; }
.quick-risk.pause { background: rgba(255, 93, 93, .14); color: #ff8d8d; }
.quick-risk.resume { background: rgba(212, 175, 55, 0.16); color: var(--lime); }
.mobile-account-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 10px; }
.mobile-account-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mobile-account-head strong, .mobile-account-head b { font-size: 16px; }
.mobile-account-head b { font-variant-numeric: tabular-nums; }
.mobile-account-head span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.account-metrics { display: grid; grid-template-columns: 1.3fr 1fr .7fr; gap: 8px; margin: 16px 0 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-metrics span, .account-metrics strong { display: block; }
.account-metrics span { color: var(--muted); font-size: 10px; }
.account-metrics strong { margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-metrics small { color: var(--muted); font-size: 9px; }
.account-actions { display: flex; justify-content: space-between; gap: 10px; }
.account-actions a { color: var(--lime); font-size: 12px; font-weight: 600; }
.notification-list { padding: 6px 14px; }
.notification-row { display: flex; gap: 8px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.notification-row:last-child { border-bottom: 0; }
.kind-chip { flex: 0 0 auto; margin: 0; }

/* Mobile EA authorization flow */
.mobile-license-hero { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 22px; background: linear-gradient(145deg, #20252d, #14161b); border: 1px solid var(--line); }
.mobile-license-hero h2 { margin: 2px 0 5px; font-size: 20px; }
.mobile-license-hero p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mobile-license-hero > span { flex: 0 0 auto; color: var(--lime); font-size: 12px; font-weight: 600; }
.mobile-dev-head { display:flex; justify-content:space-between; gap:14px; padding:18px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,#202a14,#151a12); }
.mobile-dev-head h2 { margin:3px 0 5px; } .mobile-dev-head p { margin:0; color:var(--muted); } .mobile-dev-head strong { color:var(--lime); white-space:nowrap; }
.mobile-dev-tabs { display:flex; gap:6px; overflow:auto; padding:6px; margin:12px 0 16px; border:1px solid var(--line); border-radius:14px; background:var(--card); }
.mobile-dev-tab { border:0; background:transparent; color:var(--muted); padding:9px 12px; border-radius:9px; white-space:nowrap; } .mobile-dev-tab.active { background:var(--lime); color:var(--lime-ink); font-weight:700; } .mobile-dev-tab em { font-style:normal; opacity:.75; }
.mobile-dev-panel[hidden] { display:none; } .mobile-dev-title { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; } .mobile-dev-title h2 { margin:2px 0; }
.mobile-dev-app-list { display:grid; gap:10px; } .mobile-dev-app { padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--card); } .mobile-dev-app > div { display:flex; justify-content:space-between; gap:10px; } .mobile-dev-app small,.mobile-dev-app p,.mobile-dev-app span { display:block; color:var(--muted); font-size:11px; margin:5px 0 0; } .mobile-dev-app code { display:block; margin-top:10px; color:var(--lime); font-size:11px; word-break:break-all; }
.mobile-attention { color:#f3d28a; margin-bottom:10px; }
@media (max-width: 520px) { .mobile-dev-head { flex-direction:column; } .mobile-dev-head strong { white-space:normal; } }
.mobile-steps { display: flex; gap: 7px; overflow-x: auto; padding: 12px 1px 4px; scrollbar-width: none; }
.mobile-steps::-webkit-scrollbar { display: none; }
.mobile-step {
  flex: 0 0 82px;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: auto auto;
  column-gap: 5px;
  text-align: left;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--muted);
  transition: all 0.2s ease;
}
.mobile-step b {
  grid-row: 1 / span 2;
  width: 21px; height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card-hover);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.mobile-step span { color: var(--text); font-size: 11px; font-weight: 500; }
.mobile-step em { color: var(--muted); font-size: 9px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-step.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-glow);
}
.mobile-step.active b, .mobile-step.done b {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}
.mobile-pane { display: none; margin-top: 14px; }
.mobile-pane.active { display: block; animation: pane-in .18s ease-out; }
@keyframes pane-in { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.mobile-pane-head { margin: 0 2px 12px; }
.mobile-pane-head h2 { margin: 3px 0; font-size: 19px; }
.mobile-pane-head p { margin: 0; line-height: 1.5; }
.mobile-form { gap: 12px; }
.mobile-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.mobile-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mobile-summary { padding: 11px 12px; background: #101218; border-radius: 12px; color: var(--muted); font-size: 12px; word-break: break-all; }
.mobile-list { margin-top: 10px; }
.mobile-list h3 { margin: 0 0 8px; font-size: 14px; }
.mobile-list-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.mobile-list-row:last-child { border-bottom: 0; }
.mobile-list-row strong, .mobile-list-row code, .mobile-list-row small { display: block; }
.mobile-list-row code { margin-top: 4px; color: var(--lime); font-size: 10px; word-break: break-all; }
.mobile-list-row small { margin-top: 5px; color: var(--muted); font-size: 10px; word-break: break-all; }
.mobile-result { margin-top: 10px; }
.mobile-result code { display: block; padding: 10px; margin-top: 8px; color: var(--lime); background: #101218; border-radius: 10px; font-size: 10px; word-break: break-all; }
.mobile-result pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 10px; color: #cbd4e4; }
.bridge-only .param-field-restart-only { display: none; }

/* Template editor shares the desktop workflow; retain the mobile gold layout. */
.template-page-head { display: grid; gap: 12px; margin-bottom: 16px; }
.template-page-head h2 { margin: 4px 0 8px; }
.template-page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.template-page-head .eyebrow { color: var(--gold); font-size: 10px; letter-spacing: .12em; }
.template-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.template-toolbar-actions button { flex: 1; min-width: 0; }
.template-toolbar { display: grid; gap: 12px; }
.template-tabs { display: flex; gap: 8px; margin: 16px 0; }
.template-tabs button { display: grid; gap: 4px; flex: 1; min-width: 0; text-align: left; }
.template-tabs button small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.template-tabs button.active { border-color: var(--gold); background: rgba(212, 163, 86, .12); }
.template-list-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.template-list-head span { color: var(--muted); font-size: 12px; }
.template-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.template-card-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.template-card-main > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.template-card-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; color: var(--gold); border: 1px solid var(--line); border-radius: 9px; }
.template-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.template-card-actions button { min-width: 0; }
.template-empty { display: grid; gap: 8px; color: var(--muted); }
.template-editor { margin-top: 16px; }
.template-editor[hidden] { display: none; }
.template-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.template-editor-head h2 { margin: 0 0 8px; }
.template-editor-head p { margin-top: 0; color: var(--muted); font-size: 12px; }
.template-editor .split { display: grid; gap: 12px; }
.template-editor .param-fields { display: grid; gap: 12px; max-height: 55vh; overflow: auto; margin: 14px 0; }
.template-editor .param-field { min-width: 0; }
.template-editor .param-field code { overflow-wrap: anywhere; }
@media (min-width: 600px) { .template-editor .split, .template-editor .param-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
