* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
.board-body {
  height: 100%;
  overflow: hidden;
  background: #eef1f4;
  color: #222;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #ececec;
}
.logo { color: #111; text-decoration: none; font-weight: 700; font-size: 15px; }
.top nav { display: flex; gap: 16px; }
.top nav button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  color: #888;
  cursor: pointer;
}
.top nav button.on { color: #21a366; font-weight: 650; }
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: #666;
}
.top-right b { font-weight: 600; color: #333; }
.top-right button {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
}

.board {
  display: grid;
  grid-template-columns: 228px 1fr;
  height: calc(100% - 48px);
}
.side {
  background: #f7f8fa;
  border-right: 1px solid #ececec;
  padding: 14px 14px 24px;
  overflow: auto;
  font-size: 13px;
}
.side-block { margin-bottom: 16px; }
.side-block label {
  display: block;
  color: #666;
  margin-bottom: 8px;
}
.seg { display: flex; gap: 16px; }
.seg button {
  border: 0;
  background: none;
  padding: 0;
  color: #999;
  cursor: pointer;
  font-size: 13px;
}
.seg button.on { color: #21a366; font-weight: 650; }
.side input[type="range"] {
  width: 100%;
  accent-color: #21a366;
}
.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  color: #555;
}
.side-row em { font-style: normal; color: #888; font-size: 12px; }
.link {
  border: 0;
  background: none;
  color: #21a366;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}
.group-hd {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer;
  color: #333;
  font-size: 13px;
}
.group-hd::before { content: "▾ "; color: #21a366; }
.group.is-hide .group-hd::before { content: "▸ "; }
.group.is-hide .id-grid { display: none; }
.id-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px 4px;
}
.id-grid button {
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
  border-radius: 4px;
}
.id-grid button.on,
.id-grid button:hover { background: #e8f6ee; color: #21a366; }

.stage {
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  --win: 176px;
  --main: 320px;
}
.stage.is-single { justify-content: flex-start; }
.win {
  width: var(--win);
  background: #111;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.stage.is-single .win { display: none; }
.stage.is-single .win.is-main {
  display: flex;
  width: var(--main);
}
.win-hd {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  background: #f3f4f6;
  font-size: 11px;
  color: #6b7280;
}
.win-id {
  min-width: 28px;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  background: #2aa876;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.win.is-cast .win-id { background: #2563eb; }
.win-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-star { border: 0; background: none; cursor: pointer; color: #9ca3af; }
.win-star.on { color: #21a366; }
.win-screen {
  height: calc(var(--win) * 1.78);
  position: relative;
  overflow: hidden;
}
.stage.is-single .win.is-main .win-screen { height: calc(var(--main) * 1.78); }
.skin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
.skin-home { background: #f7f7f8; }
.skin-home i {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5ee7df, #b490ca 50%, #f7797d);
  display: block;
}
.skin-down { background: #111; color: #8b9099; }
.skin-panel {
  background: #eef6fb;
  color: #334155;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px;
  font-size: 11px;
  gap: 6px;
}
.skin-panel b { font-size: 12px; }
.skin-panel span {
  display: block;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: left;
}
.skin-launch {
  background: radial-gradient(circle at 70% 20%, #6d4dff, #1b1240 55%);
  color: #fff;
  flex-direction: column;
  gap: 12px;
}
.skin-launch strong { font-size: 22px; letter-spacing: 1px; }
.apps { display: grid; grid-template-columns: repeat(3, 18px); gap: 8px; }
.apps i { width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.85); }
.win-ft {
  height: 24px;
  border: 0;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.win-ft.refresh { background: #e45b6b; }
.win-ft.cast { background: #3b82f6; }

.buy {
  height: calc(100% - 48px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  background: #f4f8f6;
}
.buy-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid #e5ece8;
}
.buy-card h1 { margin: 0 0 8px; font-size: 22px; }
.buy-card p { margin: 0 0 16px; color: #66756e; line-height: 1.7; }
.buy-card ul { margin: 0 0 20px; padding-left: 18px; color: #444; line-height: 1.9; }
.buy-card a {
  display: inline-flex;
  background: #21a366;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 650;
}
@media (max-width: 800px) {
  .board { grid-template-columns: 1fr; }
  .side { display: none; }
}
