/* 拾光脱机 云端版 —— 赛尔号风格主题
   颜色取自原版登录界面与游戏面板：深空蓝底、亮蓝面板框、黄橙主按钮。
   页面专用样式写在 css/pages/<页面>.css，组件样式只在这里改。 */

:root {
  --sg-space: #061433;
  --sg-space-2: #0b2560;
  --sg-blue-dark: #0b3f99;
  --sg-blue: #1f7fe0;
  --sg-blue-light: #5cc0ff;
  --sg-cyan: #7fe3ff;
  --sg-ink: #0d2b5c;
  --sg-ink-2: #3d5c8c;
  --sg-muted: #6a84ab;
  --sg-panel: #eef7ff;
  --sg-panel-2: #d9edff;
  --sg-panel-line: #9cc9f2;
  --sg-frame: #2c86df;
  --sg-frame-dark: #0f4fa8;
  --sg-yellow: #ffe066;
  --sg-orange: #ff9a1a;
  --sg-orange-dark: #b45309;
  --sg-red: #ff5a5a;
  --sg-red-dark: #b91c1c;
  --sg-green: #2fbf6f;
  --sg-purple: #8a5cd6;
  --sg-radius: 12px;
  --sg-radius-sm: 8px;
  --sg-shadow: 0 6px 18px rgba(3, 18, 52, .35);
  --sg-font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --sg-mono: Consolas, "Cascadia Mono", "Microsoft YaHei", monospace;
  --sg-header-h: 64px;
  --sg-nav-w: 182px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sg-font);
  font-size: 14px;
  color: var(--sg-ink);
  background-color: var(--sg-space);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(92, 192, 255, .18), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(127, 227, 255, .12), transparent 50%),
    url("../assets/seer/login/bg_space.jpg");
  background-size: auto, auto, cover;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }
a { color: var(--sg-blue); }
:focus-visible { outline: 3px solid var(--sg-cyan); outline-offset: 2px; }

/* ---------- 滚动条：细长、两头圆、没有轨道和边框 ----------
   深色底（页面、左侧导航、日志框）用浅色半透明滑块，浅色面板里用淡深色滑块。 */
html, .sg-nav, .sg-log__body, .login-wrap { --sb-thumb: rgba(186, 222, 255, .42); --sb-thumb-hover: rgba(214, 238, 255, .75); }
.sg-card, .sg-modal, .sg-table-wrap { --sb-thumb: rgba(13, 43, 92, .26); --sb-thumb-hover: rgba(13, 43, 92, .46); }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-track-piece, ::-webkit-scrollbar-corner { background: transparent; border: 0; box-shadow: none; }
::-webkit-scrollbar-thumb {
  background-color: var(--sb-thumb);
  border: 2px solid transparent; background-clip: padding-box;   /* 实际 6px 宽，两边留空 */
  border-radius: 999px; min-height: 36px;
}
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background-color: var(--sb-thumb-hover); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* Firefox 不认上面的写法，用标准属性（只给 Firefox：Chrome 设了这两个属性会忽略上面的圆角样式） */
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
}

/* ---------- 顶栏 ---------- */
.sg-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--sg-header-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 18px;
  background: linear-gradient(180deg, #2a8cf0 0%, #1565c9 55%, #0d4aa3 100%);
  border-bottom: 3px solid var(--sg-cyan);
  box-shadow: 0 4px 14px rgba(0, 20, 60, .45), inset 0 1px 0 rgba(255, 255, 255, .45);
  color: #fff;
}
.sg-header__brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 0 auto; }
.sg-header__logo { height: 46px; width: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.sg-header__title { font-size: 18px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 0 var(--sg-blue-dark), 0 0 6px rgba(0,0,0,.35); white-space: nowrap; }
.sg-header__sub { font-size: 12px; color: #d6f1ff; white-space: nowrap; }
.sg-header__account { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; flex: 1 1 auto; }
.sg-header__acc { min-width: 120px; max-width: 300px; flex: 0 1 auto; }
@media (max-width: 1180px) {
  .sg-header__sub, .sg-header__state { display: none; }
}
.sg-header__state { font-size: 12px; color: #e6f6ff; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sg-header__money { display: flex; gap: 8px; }
.sg-header__tools { display: flex; align-items: center; gap: 6px; }
.sg-header__batt { flex: 0 0 auto; margin-left: 4px; }
.sg-money {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, #0c3d8f, #0a2f70);
  border: 2px solid #5fb6ff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.35);
  font-weight: 700; color: #fff; white-space: nowrap;
}
.sg-money__icon { width: 26px; height: 26px; background: center / contain no-repeat; }
.sg-money--coin .sg-money__icon { background-image: url("../assets/seer/icons/coin.png"); }
.sg-money--gold .sg-money__icon { background-image: url("../assets/seer/icons/gold_bean.png"); }
.sg-conn { font-size: 12px; color: #ffe08a; }
.sg-conn.is-online::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #5cff9d; box-shadow: 0 0 6px #5cff9d; }

/* ---------- 主体：导航 + 页面 ---------- */
.sg-body { display: flex; min-height: calc(100vh - var(--sg-header-h)); }
.sg-nav {
  position: sticky; top: var(--sg-header-h);
  align-self: flex-start;
  width: var(--sg-nav-w); flex: 0 0 var(--sg-nav-w);
  height: calc(100vh - var(--sg-header-h));
  overflow-y: auto;
  padding: 12px 10px 20px;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgba(8, 30, 80, .82), rgba(5, 18, 50, .9));
  border-right: 2px solid rgba(92, 192, 255, .45);
}
.sg-nav__item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 14px;
  text-decoration: none;
  color: #e9f6ff; font-weight: 700; font-size: 13px;
  background: linear-gradient(180deg, #2d77d2, #174fa6);
  border: 2px solid #6cc3ff;
  box-shadow: 0 3px 0 #0a2f70, inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .08s, filter .12s, box-shadow .08s;
}
.sg-nav__item:hover { filter: brightness(1.12); }
.sg-nav__item.is-active {
  background: linear-gradient(180deg, var(--sg-yellow), var(--sg-orange));
  border-color: #fff3b0; color: #5a2a00;
  box-shadow: 0 3px 0 var(--sg-orange-dark), inset 0 1px 0 rgba(255,255,255,.7), 0 0 12px rgba(255, 210, 63, .55);
}
.sg-nav__item.is-pressed { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 #0a2f70, inset 0 2px 4px rgba(0,0,0,.3); }
.sg-nav__icon {
  flex: 0 0 34px; width: 34px; height: 34px;
  border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #ffffff, #cde9ff);
  border: 2px solid rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
}
.sg-nav__icon img { width: 100%; height: 100%; object-fit: contain; }
.sg-nav__text { line-height: 1.15; }
.sg-nav__group {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: 12px; cursor: pointer;
  color: #cfe8ff; font-weight: 800; font-size: 13px;
  background: rgba(9, 34, 88, .55);
  border: 1px solid rgba(92, 192, 255, .35);
  transition: filter .12s, background .12s;
}
.sg-nav__group:hover { filter: brightness(1.18); }
.sg-nav__group.is-open { background: rgba(13, 46, 110, .78); border-color: rgba(92, 192, 255, .8); }
.sg-nav__group .sg-nav__icon { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; }
.sg-nav__count {
  margin-left: auto;
  font-size: 10px; font-weight: 800; color: #bfe3ff;
  background: rgba(255, 255, 255, .16); border-radius: 8px; padding: 1px 6px;
}
.sg-nav__chev { font-size: 11px; transition: transform .12s; }
.sg-nav__group.is-open .sg-nav__chev { transform: rotate(90deg); }
.sg-nav__sub { display: none; flex-direction: column; gap: 6px; padding-left: 14px; }
.sg-nav__sub.is-open { display: flex; }
.sg-nav__sub .sg-nav__item { padding: 5px 6px; font-size: 12px; border-radius: 10px; box-shadow: 0 2px 0 #0a2f70; }
.sg-nav__sub .sg-nav__icon { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; }
.sg-nav__sub .sg-nav__item.is-active { box-shadow: 0 2px 0 var(--sg-orange-dark), inset 0 1px 0 rgba(255,255,255,.7), 0 0 12px rgba(255, 210, 63, .55); }
.sg-nav-toggle { display: none; }

.sg-main { flex: 1 1 auto; min-width: 0; padding: 16px 20px 40px; }
.sg-page { max-width: 1400px; margin: 0 auto; }
.sg-page__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sg-page__title {
  margin: 0; font-size: 22px; font-weight: 900; letter-spacing: 2px; color: #fff;
  text-shadow: 0 2px 0 var(--sg-blue-dark), 0 0 10px rgba(92, 192, 255, .8);
}
.sg-page__content { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 卡片（游戏面板样式） ---------- */
.sg-card {
  position: relative;
  background: linear-gradient(180deg, var(--sg-panel), var(--sg-panel-2));
  border: 3px solid var(--sg-frame);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow), inset 0 0 0 2px rgba(255,255,255,.75);
  min-width: 0;
}
.sg-card__head {
  display: flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 6px 12px;
  background: linear-gradient(180deg, #3d9cf5, #1f6fd0);
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--sg-frame-dark);
  color: #fff;
}
.sg-card__title { font-weight: 800; font-size: 15px; letter-spacing: 1px; text-shadow: 0 1px 0 var(--sg-frame-dark), 0 0 4px rgba(0,0,0,.25); }
.sg-card__extra { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sg-card__extra .sg-muted { color: #dff3ff; }
.sg-card__body { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sg-card--plain { border-width: 2px; }

/* ---------- 布局 ---------- */
.sg-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sg-row--wrap { flex-wrap: wrap; }
.sg-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sg-grid { display: grid; gap: 12px; min-width: 0; }
.sg-spacer { flex: 1 1 auto; }
.sg-actionbar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(13, 60, 140, .92), rgba(8, 36, 90, .95));
  border: 2px solid var(--sg-blue-light);
  border-radius: var(--sg-radius);
  color: #fff;
  box-shadow: var(--sg-shadow);
}

/* ---------- 文本 ---------- */
.sg-label { color: var(--sg-ink); font-weight: 600; }
.sg-muted { color: var(--sg-muted); font-size: 12px; }
.sg-strong { font-weight: 800; }
.sg-hint { margin: 0; color: var(--sg-ink-2); font-size: 12px; line-height: 1.6; }
.sg-tone--ok { color: #13844a; font-weight: 700; }
.sg-tone--warn { color: #b7791f; font-weight: 700; }
.sg-tone--err { color: #d03535; font-weight: 700; }
.sg-tone--muted { color: var(--sg-muted); }
.sg-actionbar .sg-tone--ok { color: #7dffb5; }
.sg-actionbar .sg-tone--warn { color: #ffe08a; }
.sg-actionbar .sg-tone--err { color: #ffb0b0; }
.sg-form-error { color: #d03535; font-size: 13px; min-height: 18px; }

/* ---------- 按钮（按下有反馈） ---------- */
.sg-btn {
  --b1: #6fcbff; --b2: #1f7fe0; --edge: #0b4aa8; --txt: #fff;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 18px;
  border: 2px solid var(--edge);
  background: linear-gradient(180deg, var(--b1) 0%, var(--b2) 100%);
  color: var(--txt); font-weight: 800; letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(0,0,0,.28);
  box-shadow: 0 3px 0 var(--edge), inset 0 2px 0 rgba(255,255,255,.55);
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform .06s ease, box-shadow .06s ease, filter .12s;
}
.sg-btn::after { /* 高光 */
  content: ""; position: absolute; left: 10%; right: 10%; top: 3px; height: 38%;
  border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  pointer-events: none;
}
.sg-btn:hover:not(:disabled) { filter: brightness(1.08) saturate(1.1); }
.sg-btn.is-pressed:not(:disabled), .sg-btn:active:not(:disabled) {
  transform: translateY(3px) scale(.97);
  box-shadow: 0 0 0 var(--edge), inset 0 3px 6px rgba(0,0,0,.35);
  filter: brightness(.95);
}
.sg-btn:disabled { cursor: not-allowed; filter: grayscale(.85) brightness(.95); opacity: .65; }
.sg-btn--primary { --b1: var(--sg-yellow); --b2: var(--sg-orange); --edge: var(--sg-orange-dark); --txt: #5a2a00; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.sg-btn--danger { --b1: #ff9a9a; --b2: #e23b3b; --edge: var(--sg-red-dark); }
.sg-btn--ok { --b1: #8ef0a8; --b2: #22a85a; --edge: #116b38; }
.sg-btn--ghost { --b1: #ffffff; --b2: #d6ecff; --edge: #5aa7ea; --txt: var(--sg-ink); text-shadow: none; }
.sg-btn--small { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 14px; box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,.55); }
.sg-btn--small.is-pressed:not(:disabled), .sg-btn--small:active:not(:disabled) { transform: translateY(2px) scale(.96); }
.sg-btn--block { width: 100%; }
.sg-btn--icon { width: 30px; padding: 0; }
.sg-btn.is-busy .sg-btn__text { opacity: .55; }
.sg-btn.is-busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: sg-spin .7s linear infinite;
}
.sg-card__head .sg-btn--small { box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,.55); }

/* 图标（线条图标：用 CSS 画，不依赖外部字体） */
.sg-icon { display: inline-block; width: 16px; height: 16px; background: center / contain no-repeat; flex: 0 0 auto; }
.sg-btn__icon { width: 14px; height: 14px; }
.sg-icon--play { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2.5v11l9-5.5z' fill='currentColor'/%3E%3C/svg%3E"); }
.sg-icon--stop { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3.5' y='3.5' width='9' height='9' rx='1.5' fill='white'/%3E%3C/svg%3E"); }
.sg-icon--add { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v12M2 8h12' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sg-icon--sync { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M13 6a5 5 0 0 0-9-2M3 10a5 5 0 0 0 9 2'/%3E%3Cpath d='M4 1v3h3M12 15v-3H9'/%3E%3C/svg%3E"); }
.sg-icon--delete { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 4h10M6 4V2.5h4V4M4.5 4l.7 9.5h5.6l.7-9.5'/%3E%3C/svg%3E"); }
.sg-icon--logout { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 3H3v10h3M10 5l3 3-3 3M13 8H6'/%3E%3C/svg%3E"); }
.sg-icon--people { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5' r='3' fill='white'/%3E%3Cpath d='M2 14c.5-3.5 3-5 6-5s5.5 1.5 6 5z' fill='white'/%3E%3C/svg%3E"); }
.sg-icon--sound { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z' fill='%230d2b5c'/%3E%3Cpath d='M11 5.5a3.5 3.5 0 0 1 0 5M12.8 3.6a6 6 0 0 1 0 8.8' stroke='%230d2b5c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sg-icon--mute { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z' fill='%230d2b5c'/%3E%3Cpath d='M11 6l4 4M15 6l-4 4' stroke='%23d03535' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sg-btn--primary .sg-icon--play { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2.5v11l9-5.5z' fill='%235a2a00'/%3E%3C/svg%3E"); }
.sg-icon--coin { background-image: url("../assets/seer/icons/coin.png"); }
.sg-icon--gold { background-image: url("../assets/seer/icons/gold_bean.png"); }
.sg-icon--energy { background-image: url("../assets/seer/icons/energy.png"); }

/* ---------- 输入控件 ---------- */
.sg-input, .sg-select {
  height: 34px; padding: 0 10px;
  border-radius: 10px;
  border: 2px solid #78b6ee;
  background: #fff;
  color: var(--sg-ink);
  box-shadow: inset 0 2px 3px rgba(13, 43, 92, .15);
  min-width: 0;
}
.sg-input:focus, .sg-select:focus { border-color: var(--sg-blue); outline: none; box-shadow: 0 0 0 3px rgba(92, 192, 255, .35), inset 0 2px 3px rgba(13, 43, 92, .15); }
.sg-input--number { text-align: center; }
.sg-textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.sg-header .sg-select { height: 32px; border-color: #9ad6ff; background: #f3faff; }
.sg-field { display: inline-flex; flex-direction: column; gap: 4px; min-width: 0; }
.sg-field__label { font-size: 12px; font-weight: 700; color: var(--sg-ink-2); }
.sg-field__hint { font-size: 11px; color: var(--sg-muted); }

.sg-check, .sg-toggle, .sg-radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; position: relative; }
.sg-check__box, .sg-toggle__box, .sg-radio__box { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
/* 原版组件库复选框（MCheckBox） */
.sg-check__mark {
  width: 20px; height: 20px; flex: 0 0 auto;
  background: url("../assets/seer/ui/checkbox_unchecked.png") center / 20px 20px no-repeat;
  background-image: image-set(url("../assets/seer/ui/checkbox_unchecked.png") 1x, url("../assets/seer/ui/checkbox_unchecked@2x.png") 2x);
  transition: transform .06s;
}
.sg-check__box:checked + .sg-check__mark {
  background-image: url("../assets/seer/ui/checkbox_checked.png");
  background-image: image-set(url("../assets/seer/ui/checkbox_checked.png") 1x, url("../assets/seer/ui/checkbox_checked@2x.png") 2x);
}
.sg-check__box:focus-visible + .sg-check__mark, .sg-toggle__box:focus-visible + .sg-toggle__track, .sg-radio__box:focus-visible + .sg-radio__mark { outline: 3px solid var(--sg-cyan); outline-offset: 2px; }
.sg-check.is-pressed .sg-check__mark, .sg-radio.is-pressed .sg-radio__mark { transform: scale(.88); }
.sg-check.is-disabled, .sg-toggle.is-disabled { opacity: .55; cursor: not-allowed; }
.sg-toggle__track {
  width: 44px; height: 24px; border-radius: 12px; flex: 0 0 auto;
  background: #b9c9de; border: 2px solid #8aa2c2;
  position: relative; transition: background .15s;
  box-shadow: inset 0 2px 3px rgba(0,0,0,.2);
}
.sg-toggle__thumb {
  position: absolute; top: 1px; left: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #dbe9ff);
  box-shadow: 0 2px 3px rgba(0,0,0,.3);
  transition: left .15s;
}
.sg-toggle__box:checked + .sg-toggle__track { background: linear-gradient(180deg, #7ee08f, #22a85a); border-color: #117a40; }
.sg-toggle__box:checked + .sg-toggle__track .sg-toggle__thumb { left: 21px; }
.sg-toggle.is-pressed .sg-toggle__thumb { width: 22px; }
.sg-radios { display: flex; flex-wrap: wrap; gap: 14px; }
.sg-radio__mark {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid #4f9fe8; background: #fff; transition: transform .06s;
}
.sg-radio__box:checked + .sg-radio__mark { border-color: var(--sg-orange-dark); background: radial-gradient(circle, var(--sg-orange) 0 45%, #fff 50%); }
.sg-radio__text, .sg-check__text, .sg-toggle__text { font-weight: 600; }
.sg-radio.is-disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 徽标 / 统计 / 进度 ---------- */
.sg-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.sg-badge--info { background: #dbeeff; color: #1f5fb8; border-color: #9fcaf3; }
.sg-badge--ok { background: #dcf7e6; color: #137a43; border-color: #93dcb0; }
.sg-badge--warn { background: #fff1cc; color: #8a5a00; border-color: #f2cf73; }
.sg-badge--err { background: #ffe1e1; color: #b42323; border-color: #f2a1a1; }
.sg-badge--muted { background: #e8eef6; color: #5c6f8c; border-color: #c6d3e4; }
.sg-badge--purple { background: #efe5ff; color: #6b3fc0; border-color: #c9b1f2; }
.sg-stat {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; min-width: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #e8f4ff);
  border: 2px solid #a9d3f7;
}
.sg-stat__icon { width: 30px; height: 30px; flex: 0 0 30px; }
.sg-stat__icon:not([class*="sg-icon--coin"]):not([class*="sg-icon--gold"]):not([class*="sg-icon--energy"]) { display: none; }
.sg-stat__main { min-width: 0; }
.sg-stat__value { font-size: 19px; font-weight: 900; color: var(--sg-blue); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-stat__label { font-size: 12px; color: var(--sg-muted); }
/* 进度条：原版读取条（深蓝槽 + 青色亮条，尖端有闪光） */
.sg-progress { position: relative; height: 14px; border-radius: 7px; background: url("../assets/seer/ui/progress_track.png") center / 100% 100% no-repeat, #0f4c96; overflow: hidden; box-shadow: 0 0 0 2px #cfe9ff, inset 0 2px 3px rgba(0,0,0,.35); }
.sg-progress__bar { position: relative; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(180deg, #b8f7ff 0%, #45d3ff 45%, #1aa3e8 100%); box-shadow: 0 0 6px #7fe3ff; transition: width .3s; }
.sg-progress__bar::after { content: ""; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: radial-gradient(circle, #fff 0 18%, rgba(255,255,255,.5) 32%, transparent 62%); }
.sg-progress__text { position: absolute; inset: 0; font-size: 10px; line-height: 12px; text-align: center; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
.sg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px; background: #b4b6bc; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.sg-dot--ok { background: #2fbf6f; box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 6px #2fbf6f; }
.sg-dot--warn { background: #f0b429; }
.sg-dot--err { background: #e23b3b; }

/* ---------- 日志 ---------- */
.sg-log { position: relative; height: 220px; border-radius: 10px; background: #0b1f45; border: 2px solid #2b6fc8; box-shadow: inset 0 2px 8px rgba(0,0,0,.5); overflow: hidden; }
.sg-log__body { height: 100%; overflow-y: auto; padding: 8px 10px; font-family: var(--sg-mono); font-size: 12px; line-height: 1.6; color: #a9d4ff; }
.sg-log__line { white-space: pre-wrap; word-break: break-all; }
.sg-log__line.is-warn { color: #ffb4a8; }
.sg-log__line.is-ok { color: #8ff0b4; }
.sg-log__empty { color: #5b7fb3; }

/* ---------- 表格 ---------- */
.sg-table-wrap { overflow: auto; border-radius: 10px; border: 2px solid #a9d3f7; background: #fff; }
.sg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sg-table th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 7px 10px; background: linear-gradient(180deg, #e3f2ff, #cfe6ff); color: var(--sg-ink-2); font-weight: 800; white-space: nowrap; border-bottom: 2px solid #9cc9f2; }
.sg-table td { padding: 6px 10px; border-bottom: 1px solid #e3eef9; vertical-align: middle; }
.sg-table tr:nth-child(even) td { background: #f6fbff; }
.sg-table tr.is-clickable { cursor: pointer; }
.sg-table tr.is-clickable:hover td { background: #e6f4ff; }
.sg-table tr.is-selected td { background: #fff3c4 !important; }
.sg-table tr.is-pressed td { background: #ffe58a !important; }
.sg-table .is-right { text-align: right; }
.sg-table .is-center { text-align: center; }
.sg-table__empty td { text-align: center; color: var(--sg-muted); padding: 18px; }

/* ---------- 标签页 ---------- */
.sg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-tab {
  height: 32px; padding: 0 16px; border-radius: 16px 16px 6px 6px;
  border: 2px solid #5aa7ea; background: linear-gradient(180deg, #ffffff, #d6ecff);
  color: var(--sg-ink); font-weight: 800; cursor: pointer; transition: transform .06s;
}
.sg-tab.is-active { background: linear-gradient(180deg, var(--sg-yellow), var(--sg-orange)); border-color: var(--sg-orange-dark); color: #5a2a00; }
.sg-tab.is-pressed { transform: translateY(2px); }

/* ---------- 精灵头像 / 物品图标 ---------- */
.sg-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #ffffff, #d6ebff); border: 2px solid #9ccaf2; }
.sg-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sg-thumb--item { background: radial-gradient(circle at 50% 40%, #ffffff, #e6f2ff); }
.sg-thumb__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }

/* ---------- 空状态 / 加载 ---------- */
.sg-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 10px; color: var(--sg-ink-2); text-align: center; }
.sg-page__content > .sg-empty { background: rgba(238, 247, 255, .92); border-radius: var(--sg-radius); border: 3px solid var(--sg-frame); }
.sg-empty__nono { width: 64px; height: 64px; background: url("../assets/seer/ui/nono.png") center / contain no-repeat; }
.sg-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: #dff3ff; font-weight: 700; }
/* 原版 LOADING 转圈：24 帧横排，1 秒一圈 */
.sg-loading__spin { width: 40px; height: 40px; background: url("../assets/seer/ui/loading_spinner_strip.png") 0 0 / 960px 40px no-repeat; animation: sg-spin-strip 1s steps(24) infinite; }
@keyframes sg-spin-strip { to { background-position: -960px 0; } }
@keyframes sg-spin { to { transform: rotate(360deg); } }

/* ---------- 弹窗 ---------- */
.sg-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 10, 30, .62); animation: sg-fade .15s ease; }
.sg-overlay.is-leaving { opacity: 0; transition: opacity .18s; }
/* 弹窗 = 原版组件库窗口（MPanel，九宫格来自原版 DefineScalingGrid：上57 右37 下29 左34） */
.sg-modal {
  position: relative;
  width: 520px; max-width: 100%; max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  border-style: solid; border-width: 57px 37px 29px 34px;
  border-image: url("../assets/seer/ui/panel_window.png") 57 37 29 34 fill stretch;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .55));
  animation: sg-pop .18s ease;
}
.sg-modal__head {
  position: absolute; left: 0; right: 0; top: -51px; height: 38px;
  display: flex; align-items: center; gap: 8px; padding: 0 2px 0 4px; color: #fff;
}
.sg-modal__title { font-weight: 800; font-size: 16px; letter-spacing: 1px; text-shadow: 0 1px 0 #0b4aa8, 0 0 4px rgba(0,0,0,.35); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-modal__close {
  margin-left: auto; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 0; cursor: pointer;
  background: url("../assets/seer/ui/btn_close_up.png") center / 30px 30px no-repeat;
  background-image: image-set(url("../assets/seer/ui/btn_close_up.png") 1x, url("../assets/seer/ui/btn_close_up@2x.png") 2x);
  transition: transform .06s;
}
.sg-modal__close:hover { background-image: image-set(url("../assets/seer/ui/btn_close_over.png") 1x, url("../assets/seer/ui/btn_close_over@2x.png") 2x); }
.sg-modal__close.is-pressed { background-image: image-set(url("../assets/seer/ui/btn_close_down.png") 1x, url("../assets/seer/ui/btn_close_down@2x.png") 2x); transform: scale(.9); }
.sg-modal__body { padding: 6px 4px 4px; overflow: auto; display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.sg-modal__text { margin: 0; line-height: 1.7; white-space: pre-line; }
.sg-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 2px 2px; flex-wrap: wrap; }
@keyframes sg-fade { from { opacity: 0; } }
@keyframes sg-pop { from { transform: scale(.94); opacity: 0; } }

/* ---------- 提示（NPC 对话框样式） ---------- */
.sg-toasts { position: fixed; z-index: 200; top: calc(var(--sg-header-h) + 10px); right: 14px; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 28px)); }
/* 提示 = 游戏里的 NPC 对话框（原版 NPC_MC 框）+ NoNo */
.sg-toast {
  position: relative; cursor: pointer; min-height: 64px;
  border-style: solid; border-width: 16px 18px 16px 11px;
  border-image: url("../assets/seer/ui/npc_dialog_frame.png") 31 36 31 22 fill stretch;
  padding: 0 4px 0 52px;
  color: #fff;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  animation: sg-slide .2s ease;
}
.sg-toast::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 42px; height: 52px; margin-top: -26px;
  background: url("../assets/seer/ui/nono.png") center / contain no-repeat;
}
.sg-toast.is-leaving { opacity: 0; transform: translateX(20px); transition: all .2s; }
.sg-toast__title { font-weight: 800; color: #7fe3ff; }
.sg-toast__text { margin-top: 3px; font-size: 13px; color: #e8f4ff; word-break: break-all; line-height: 1.5; }
.sg-toast--success .sg-toast__title { color: #8ff0b4; }
.sg-toast--warning .sg-toast__title { color: #ffe08a; }
.sg-toast--error .sg-toast__title { color: #ffb0a8; }
@keyframes sg-slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 选择列表（弹窗里选精灵等） ---------- */
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; padding-right: 2px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; border: 2px solid #c3dff7; background: #fff; cursor: pointer; transition: transform .06s; }
.pick-row:hover { border-color: #6fb6ef; }
.pick-row.is-selected { border-color: var(--sg-orange); background: #fff7d6; }
.pick-row.is-pressed { transform: scale(.985); }
.pick-row__main { flex: 1 1 auto; min-width: 0; }
.pick-row__name { font-weight: 800; }

/* ---------- 登录页（原版赛尔号登录界面 loginPage.swf，按原坐标摆放） ---------- */
body.is-login {
  background: #050d24 url("../assets/seer/login/bg_official.jpg") center / cover no-repeat fixed;
}
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(2, 8, 26, .55), rgba(2, 8, 26, .9));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.login-stage {
  --s: 1;
  position: relative; width: 960px; height: 560px; flex: 0 0 auto;
  user-select: none; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(92, 192, 255, .35), 0 20px 60px rgba(0, 0, 0, .65);
  border-radius: 8px;
}
.login-stage > * { position: absolute; }
.login-bg { left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.login-logo, .login-field__label, .login-check-text { display: none; }
.login-robot { pointer-events: none; animation: login-float 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes login-float { 50% { transform: translateY(calc(-6px * var(--s))); } }
.login-field { display: block; }
.login-input {
  width: 100%; height: 100%;
  padding: 0 calc(8px * var(--s));
  border: 0; border-radius: calc(6px * var(--s));
  background: transparent; color: #fff; caret-color: #ffe066;
  font-family: "Microsoft YaHei", sans-serif; font-size: calc(15px * var(--s));
  outline: none;
}
.login-input::placeholder { color: #1a8cff; font-family: SimSun, "Microsoft YaHei", sans-serif; font-size: calc(12px * var(--s)); letter-spacing: 1px; }
.login-input:focus { box-shadow: inset 0 0 0 calc(2px * var(--s)) rgba(127, 227, 255, .75), 0 0 calc(10px * var(--s)) rgba(92, 192, 255, .6); }
.login-check {
  border: 0; padding: 0; cursor: pointer;
  background: url("../assets/seer/login/checkbox_unchecked.png") center / contain no-repeat;
  transition: transform .06s;
}
.login-check.is-checked { background-image: url("../assets/seer/login/checkbox_checked.png"); }
.login-check.is-pressed { transform: scale(.86); }
.login-btn {
  border: 0; padding: 0; cursor: pointer; background: center / contain no-repeat;
  transition: transform .07s ease, filter .12s;
}
.login-btn.is-pressed { transform: translateY(calc(2px * var(--s))) scale(.96); }
.login-btn--login { background-image: url("../assets/seer/login/btn_login_up.png"); background-image: image-set(url("../assets/seer/login/btn_login_up.png") 1x, url("../assets/seer/login/btn_login_up@2x.png") 2x); border-radius: 50%; }
.login-btn--login:hover { background-image: url("../assets/seer/login/btn_login_over.png"); background-image: image-set(url("../assets/seer/login/btn_login_over.png") 1x, url("../assets/seer/login/btn_login_over@2x.png") 2x); }
.login-btn--login.is-pressed { transform: scale(.93); filter: brightness(.88) saturate(1.2); }
.login-btn--login.is-busy { animation: login-pulse 1s ease-in-out infinite; }
@keyframes login-pulse { 50% { filter: brightness(1.25) drop-shadow(0 0 calc(12px * var(--s)) #8ff0ff); } }
.login-btn--forget { background-image: url("../assets/seer/login/btn_forget_pass_up.png"); }
.login-btn--forget:hover { background-image: url("../assets/seer/login/btn_forget_pass_over.png"); }
.login-btn--forget.is-pressed { background-image: url("../assets/seer/login/btn_forget_pass_down.png"); }
.login-btn--modify { background-image: url("../assets/seer/login/btn_modify_pass_up.png"); }
.login-btn--modify:hover { background-image: url("../assets/seer/login/btn_modify_pass_over.png"); }
.login-btn--modify.is-pressed { background-image: url("../assets/seer/login/btn_modify_pass_down.png"); }
.login-btn--protect { background-image: url("../assets/seer/login/btn_protect_pass_up.png"); }
.login-btn--protect:hover { background-image: url("../assets/seer/login/btn_protect_pass_over.png"); }
.login-btn--protect.is-pressed { background-image: url("../assets/seer/login/btn_protect_pass_down.png"); }
.login-btn--other { background-image: url("../assets/seer/login/btn_other_robot_up.png"); }
.login-btn--other:hover { background-image: url("../assets/seer/login/btn_other_robot_over.png"); }
.login-btn--other.is-pressed { background-image: url("../assets/seer/login/btn_other_robot_down.png"); }
.login-btn--register { background-image: url("../assets/seer/login/btn_register_up.png"); }
.login-btn--register:hover { background-image: url("../assets/seer/login/btn_register_over.png"); }
.login-btn--register.is-pressed { background-image: url("../assets/seer/login/btn_register_down.png"); }
.login-btn:focus-visible { outline: calc(3px * var(--s)) solid var(--sg-cyan); outline-offset: 2px; }
.login-recommend { pointer-events: none; }
.login-notice {
  color: #fff; font-family: SimSun, "Microsoft YaHei", sans-serif; font-size: calc(12px * var(--s)); line-height: 1.5;
  text-shadow: 0 0 4px #003300, 0 0 2px #003300; white-space: nowrap; pointer-events: none;
}
.login-notice b { color: #ccff00; font-weight: normal; }
.login-tip { opacity: 0; transform: scale(.7) translateY(10px); transform-origin: 20% 100%; transition: opacity .15s, transform .18s; pointer-events: none; }
.login-tip.is-shown { opacity: 1; transform: none; }
.login-msg {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: calc(10px * var(--s)) calc(12px * var(--s));
  border-radius: calc(16px * var(--s));
  border: calc(3px * var(--s)) solid #1f6fd0;
  background: linear-gradient(180deg, #ffffff, #dff1ff);
  color: #0d2b5c; font-weight: 700; font-size: calc(13px * var(--s)); line-height: 1.45;
  box-shadow: 0 calc(4px * var(--s)) calc(12px * var(--s)) rgba(0, 0, 0, .45);
  opacity: 0; transform: scale(.8); transform-origin: 0 50%; transition: opacity .15s, transform .18s; pointer-events: none;
}
.login-msg::before {
  content: ""; position: absolute; left: calc(-14px * var(--s)); top: 50%; margin-top: calc(-9px * var(--s));
  border: calc(9px * var(--s)) solid transparent; border-right: calc(14px * var(--s)) solid #1f6fd0; border-left: 0;
}
.login-msg.is-shown { opacity: 1; transform: none; }
.login-loading { left: 0; top: 0; width: 100%; height: 100%; display: none; align-items: center; justify-content: center; background: rgba(0, 10, 40, .55); z-index: 5; }
.login-loading.is-shown { display: flex; }
.login-loading__panel { position: relative; width: calc(414px * var(--s)); max-width: 92%; }
.login-loading__panel img { display: block; width: 100%; height: auto; }
.login-loading__bar { position: absolute; left: 17.4%; top: 69.4%; width: 65.2%; height: 6%; overflow: hidden; border-radius: 4px; }
.login-loading__bar span { display: block; width: 35%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #39c7ff, #b6f6ff); box-shadow: 0 0 8px #7fe3ff; animation: login-bar 1.1s ease-in-out infinite; }
@keyframes login-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }

/* 窄屏（手机）：同样的原版部件，竖排 */
.login-wrap.is-narrow { align-items: flex-start; padding: 16px; overflow: auto; }
.is-narrow .login-stage {
  --s: 1;
  width: 100%; max-width: 420px; height: auto; overflow: visible;
  display: grid; grid-template-columns: 34px 1fr 34px 1fr; column-gap: 8px; row-gap: 12px;
  grid-template-areas:
    "logo logo logo logo"
    "robot robot robot robot"
    "acc acc acc acc"
    "pwd pwd pwd pwd"
    "c1 t1 c2 t2"
    "login login login login"
    "tip tip tip tip"
    "msg msg msg msg"
    "other other reg reg"
    "notice notice notice notice";
  padding: 18px 16px 20px;
  background: linear-gradient(180deg, #0b4fb0, #083a86);
  border: 3px solid #4fc3ff; border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset, 0 16px 40px rgba(0,0,0,.6);
}
.is-narrow .login-stage > * { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: auto !important; }
.is-narrow .login-bg, .is-narrow .login-recommend, .is-narrow .login-btn--forget, .is-narrow .login-btn--modify, .is-narrow .login-btn--protect { display: none; }
.is-narrow .login-logo { display: block; grid-area: logo; justify-self: center; width: 170px !important; }
.is-narrow .login-robot { grid-area: robot; justify-self: center; width: 70px !important; }
.is-narrow .login-field { grid-area: acc; display: flex; flex-direction: column; gap: 4px; }
.is-narrow .login-field--password { grid-area: pwd; }
.is-narrow .login-field__label { display: block; color: #cfefff; font-weight: 800; font-size: 13px; }
.is-narrow .login-input { height: 44px; font-size: 16px; padding: 0 12px; background: linear-gradient(180deg, #0a3f95, #0d57bf); border: 2px solid #4fc3ff; border-radius: 10px; box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }
.is-narrow .login-input::placeholder { font-size: 14px; color: #6fb8ff; }
.is-narrow .login-check { width: 34px !important; height: 31px !important; }
.is-narrow .login-check--id { grid-area: c1; }
.is-narrow .login-check--pwd { grid-area: c2; }
.is-narrow .login-check-text { display: flex; align-items: center; color: #ccff33; font-weight: 800; font-size: 14px; text-shadow: 0 1px 0 #003300; }
.is-narrow .login-check-text--id { grid-area: t1; }
.is-narrow .login-check-text--pwd { grid-area: t2; }
.is-narrow .login-btn--login { grid-area: login; justify-self: center; width: 150px !important; height: 150px !important; }
.is-narrow .login-btn--other { grid-area: other; justify-self: start; width: 132px !important; height: 52px !important; }
.is-narrow .login-btn--register { grid-area: reg; justify-self: end; width: 132px !important; height: 53px !important; }
.is-narrow .login-tip { grid-area: tip; justify-self: center; width: 150px !important; display: none; }
.is-narrow .login-tip.is-shown { display: block; }
.is-narrow .login-msg { grid-area: msg; display: none; font-size: 14px; }
.is-narrow .login-msg.is-shown { display: flex; }
.is-narrow .login-msg::before { display: none; }
.is-narrow .login-notice { grid-area: notice; font-size: 11px; white-space: normal; text-align: center; }
.is-narrow .login-loading { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
.is-narrow .login-loading__panel { width: 92% !important; }

/* ---------- 账号页 ---------- */
.acc-toolbar .sg-stat { min-width: 150px; }
.acc-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; }
.acc-left-wrap { position: relative; min-width: 0; }
.acc-left { position: absolute; inset: 0; display: flex; flex-direction: column; }
.acc-left .sg-card__body { flex: 1 1 auto; min-height: 0; }
.acc-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.acc-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; }
.acc-list { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.acc-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 2px solid #c3dff7; cursor: pointer; transition: transform .06s; }
.acc-row:hover { border-color: #6fb6ef; }
.acc-row.is-selected { border-color: var(--sg-orange); background: #fff7d6; }
.acc-row.is-pressed { transform: scale(.985); }
.acc-row__main { flex: 1 1 auto; min-width: 0; }
.acc-row__name { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row__state { font-size: 11px; color: var(--sg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row__coins { font-size: 12px; font-weight: 800; color: var(--sg-blue); }
.acc-status { font-size: 13px; }
.acc-info { padding: 6px 10px; border-radius: 10px; background: #fff; border: 2px solid #d3e7f9; min-width: 0; }
.acc-info__label { font-size: 11px; color: var(--sg-muted); }
.acc-info__value { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-equip { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; }
.acc-equip__row { display: flex; align-items: center; gap: 9px; padding: 5px 9px; border-radius: 10px; background: #fafcff; border: 1px solid #e0ecf7; }
.acc-equip__text { flex: 1 1 auto; min-width: 0; }
.acc-equip__part { font-size: 10px; }
.acc-equip__name { font-weight: 700; font-size: 12px; }

/* ---------- 基因重组 ---------- */
.gene-main__row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.gene-main__avatar { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #e8f0fa; }
.gene-main__q { font-size: 26px; font-weight: 900; color: #7d93b8; }
.gene-main__info { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gene-main__name { font-size: 18px; font-weight: 900; }
.gene-main__dv { font-size: 22px; font-weight: 900; color: var(--sg-blue); }
.gene-main__side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; max-width: 260px; }
.gene-dna { display: inline-flex; gap: 7px; padding: 0 4px; }
.gene-dna__gem { display: inline-block; transform: rotate(45deg); border-radius: 3px; border: 2px solid #c9d2e0; background: transparent; }
.gene-pool__cell { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #fff; border: 2px solid #d3e7f9; }
.gene-pool__text { display: flex; flex-direction: column; gap: 2px; }
.gene-pool__count { font-weight: 800; color: var(--sg-blue); font-size: 12px; }
.gene-consumed__slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border-radius: 10px; background: #fff; border: 2px solid #d3e7f9; min-height: 74px; justify-content: center; }
.gene-consumed__empty { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #c0c9d6; font-size: 11px; border-radius: 10px; background: #f4f7fc; }
.gene-consumed__n { font-weight: 900; color: var(--sg-blue); }
.gene-state { font-weight: 700; }

/* ---------- 窄屏（手机） ---------- */
@media (max-width: 1100px) {
  .acc-layout, .acc-split { grid-template-columns: minmax(0, 1fr); }
  .acc-left-wrap { position: static; }
  .acc-left { position: static; }
  .acc-list { max-height: 60vh; }
}
@media (max-width: 860px) {
  :root { --sg-header-h: auto; }
  .sg-header { position: static; height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .sg-header__sub { display: none; }
  .sg-header__account { margin-left: 0; order: 3; width: 100%; }
  .sg-header__acc { flex: 1 1 auto; max-width: none; }
  .sg-header__state { display: none; }
  .sg-header__money { order: 2; margin-left: auto; }
  .sg-header__tools { order: 1; margin-left: auto; }
  .sg-body { display: block; }
  .sg-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; height: 100vh;
    transform: translateX(-105%); transition: transform .2s ease;
    width: 190px; box-shadow: 8px 0 30px rgba(0,0,0,.5);
  }
  body.nav-open .sg-nav { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); }
  .sg-nav-toggle {
    display: inline-flex; width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
    border: 2px solid #6cc3ff; background: linear-gradient(180deg, #2d77d2, #174fa6);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 4h10M3 8h10M3 12h10' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"), linear-gradient(180deg, #2d77d2, #174fa6);
    background-size: 20px, cover; background-position: center; background-repeat: no-repeat;
  }
  .sg-main { padding: 12px 16px 32px; }
  .sg-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .sg-page__title { font-size: 19px; }
  .sg-card__head { flex-wrap: wrap; }
  .sg-actionbar { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= 手机 / 平板 / 电脑三端适配 =================
   触屏设备（手机、平板）按钮和输入框加大到手指好点的尺寸；手机上小字最小 12px；
   手机顶栏压成两行；iPhone 输入框字号 16px（小于 16px 时一点输入框整页就会被放大）。 */
@media (pointer: coarse), (max-width: 760px) {
  .sg-btn { height: 40px; }
  .sg-btn--small { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 18px; }
  .sg-btn--icon { width: 40px; }
  .sg-btn--icon.sg-btn--small { width: 36px; }
  .sg-input, .sg-select { height: 40px; font-size: 16px; }
  .sg-textarea { height: auto; }
  .sg-header .sg-select { height: 36px; }
  .sg-tab { height: 36px; }
  .sg-check, .sg-toggle, .sg-radio { min-height: 32px; }
  .sg-check__mark, .sg-radio__mark { width: 22px; height: 22px; background-size: 22px 22px; }
  .sg-nav__item { min-height: 46px; }
  .sg-modal__close { transform: scale(1.15); }
}
@media (max-width: 760px) {
  :root .sg-field__hint, :root .is-narrow .login-notice, :root .acc-row__state,
  :root .acc-info__label, :root .acc-equip__part, :root .gene-consumed__empty,
  :root .academy-row__status, :root .academy-ev__cur, :root .boss-acc__status,
  :root .boss-hp__cap, :root .catch-acc__exec, :root .catch_log-acc__sub,
  :root .catch_log-col__foot, :root .catch_log-item, :root .custom_task-row-sub,
  :root .custom_task-info-label, :root .custom_task-tl-tick, :root .custom_task-step-chan,
  :root .custom_task-claim-order, :root .daily-acc__status, :root .fusion-slot__name,
  :root .fusion-matslot__name, :root .fusion-bead__left, :root .itembag-cell__num,
  :root .itembag-mcell__tag, :root .itembag-mcell__hold, :root .leiyi-row__status,
  :root .leiyi-head__at, :root .leiyi-bar__today, :root .leiyi-check__note,
  :root .mcup-type__n, :root .mcup-medal__name, :root .mat-acc__status,
  :root .mat-pick__sub, :root .mat-pick__grade .sg-badge, :root .mat-pick__drop,
  :root .petbag-slot__lead, :root .petbag-slot__lv, :root .petbag-slot__hp,
  :root .petbag-meta__label, :root .petbag-skill__cat, :root .petbag-skill__desc,
  :root .petbag-stat__ev, :root .petbag-evo__pet, :root .petbag-card__type,
  :root .petbag-card__name, :root .petbag-card__lv, :root .petbag-sk__cap,
  :root .petbag-rel__cap, :root .petbag-slot__name { font-size: 12px; }
  .sg-progress { height: 16px; border-radius: 8px; }
  :root .sg-progress__text, :root .petbag-exp .sg-progress__text { font-size: 12px; line-height: 16px; }
  .sg-muted, .sg-hint { font-size: 12.5px; }
}
/* 手机竖屏：顶栏压成两行（标志 + 余额 + 按钮 / 当前账号） */
@media (max-width: 560px) {
  .sg-header { padding: 6px 10px; gap: 6px; }
  .sg-header__logo { height: 34px; }
  .sg-header__titles { display: none; }
  .sg-header__money { order: 1; flex: 1 1 auto; justify-content: flex-end; margin-left: 0; gap: 4px; }
  .sg-header__account { order: 2; flex: 1 1 180px; width: auto; }
  .sg-header__tools { order: 3; flex: 0 0 auto; margin-left: 0; gap: 4px; }
  .sg-money { height: 30px; padding: 0 8px 0 2px; gap: 3px; font-size: 13px; }
  .sg-money__icon { width: 22px; height: 22px; }
  .sg-header__tools .sg-btn__text { display: none; }
  .sg-header__tools .sg-btn:not(.sg-btn--icon) { width: 36px; padding: 0; }
  .sg-main { padding: 10px 10px 28px; }
  .sg-card__body { padding: 10px; }
  .sg-overlay { padding: 8px; }
  /* 手机上收窄窗口相框（border-image 原框 57/37/29/34 吃掉太多内容宽度） */
  .sg-modal { border-width: 29px 19px 15px 17px; }
  .sg-actionbar { padding: 8px 10px; gap: 6px; }
  .sg-actionbar .sg-btn { flex: 1 1 auto; padding: 0 10px; }
  .sg-toasts { top: 8px; right: 8px; width: calc(100vw - 16px); }
}
/* 横屏手机等矮屏：顶栏不再固定在上方，省出高度 */
@media (max-height: 500px) and (min-width: 861px) {
  .sg-header { position: static; }
  .sg-nav { top: 0; height: 100vh; }
}

/* 更新公告弹窗 */
.sg-ann__body { max-height: 46vh; overflow-y: auto; font-size: 14px; line-height: 1.9; color: #111318; white-space: pre-wrap; }
.sg-ann__body div { margin: 2px 0; }
.sg-ann__check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: #1c2a44; cursor: pointer; user-select: none; }
.sg-ann__check input { width: 15px; height: 15px; accent-color: #4f6ef7; }

/* 顶栏「开/关电池」弹窗 */
.sg-batt__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-batt__list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.sg-batt__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 2px solid #d3e7f9; min-width: 0; }
.sg-batt__name { flex: 1 1 auto; min-width: 0; }
.sg-batt__title { font-weight: 800; font-size: 13px; color: #1c2a44; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-batt__sub { font-size: 11.5px; color: var(--sg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-batt__row .sg-toggle { flex: 0 0 auto; }
@media (max-width: 560px) {
  .sg-batt__row { padding: 6px 8px; gap: 8px; }
  .sg-batt__row .sg-toggle__text { display: none; }
}
