* {
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", "SimSun", Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: #163330;
}

/* 晶莹剔透地…… */
body[data-theme="jelly"] {
  background: linear-gradient(135deg, #39c5bb 0%, #4ed6cc 35%, #5be2f2 70%, #3ac4f7 100%);
  background-attachment: fixed;
}

body[data-theme="jelly"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.04) 38%, rgba(255, 255, 255, 0) 38.5%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 26%);
}

.app-wrap {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 10px auto 16px;
  padding: 0 8px;
}

.main-window {
  background: rgba(235, 252, 252, 0.88);
  border: 1px solid #16828a;
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 4px 14px rgba(10, 80, 90, 0.34);
  overflow: hidden;
}

.top-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.2) 49%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.14) 100%),
    linear-gradient(135deg, #2fb5ab 0%, #39c5bb 42%, #29b5e3 100%);
  border-bottom: 1px solid #137f8c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #ffffff;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(8, 74, 82, 0.65);
}

.top-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.ui-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 3px;
  border: 1px solid #19899c;
  cursor: pointer;
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    0 1px 1px rgba(10, 74, 84, 0.2);
  transition: border-color 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.ui-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    inset 0 0 5px rgba(255, 255, 255, 0.35),
    0 0 3px rgba(42, 198, 212, 0.55);
}

.ui-btn:active:not(:disabled) {
  filter: brightness(0.93);
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: none;
}

.ui-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.btn-sky {
  background: linear-gradient(180deg, #98ecff 0%, #3ac4eb 49%, #19a8d4 50%, #31bce6 100%);
  border-color: #127e9e;
}

.btn-green {
  background: linear-gradient(180deg, #98f7ae 0%, #35cc62 49%, #1bad46 50%, #2dc459 100%);
  border-color: #137d32;
}

.btn-gold {
  color: #4a3700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, #fff8a6 0%, #ffdc40 49%, #ebbc0c 50%, #f5cd2c 100%);
  border-color: #a88200;
}

.btn-red {
  background: linear-gradient(180deg, #ffa3a3 0%, #eb3b3b 49%, #c91818 50%, #de2a2a 100%);
  border-color: #941111;
}

.btn-pearl {
  color: #16444a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #eaf8fa 49%, #d0ecf2 50%, #e4f6f9 100%);
  border-color: #6ea7b3;
}

.mode-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f5fdfd 0%, #e1f5f7 49%, #ceeef2 50%, #e0f6f8 100%);
  border-bottom: 1px solid #7abcc7;
}

.mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mode-btn {
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 3px;
  border: 1px solid #6baab5;
  cursor: pointer;
  color: #15464d;
  background: linear-gradient(180deg, #ffffff 0%, #e8f8fa 49%, #cfeef2 50%, #e2f5f8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  transition: border-color 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.mode-btn:hover {
  border-color: #22a6b3;
  filter: brightness(1.03);
  box-shadow: inset 0 0 0 1px #ffffff, 0 0 3px #ffffff;
}

.mode-btn:active {
  filter: brightness(0.94);
  transform: translateY(1px);
  box-shadow: inset 0 1px 3px rgba(12, 82, 92, 0.28);
  transition: none;
}

.mode-btn.active {
  color: #4a3700;
  border-color: #a88200;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, #fff8a6 0%, #ffdc40 49%, #ebbc0c 50%, #f5cd2c 100%);
  box-shadow: inset 0 1px 2px rgba(130, 96, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.mode-btn.active:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 3px rgba(120, 88, 0, 0.34);
  transition: none;
}

.counter-chip {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #16484f;
  background: #f4fcfc;
  border: 1px solid #7ab5bf;
  border-top-color: #5c98a3;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(14, 86, 97, 0.16);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 456px) minmax(250px, 1fr);
  gap: 10px;
  padding: 10px;
  align-items: start;
}

@media (max-width: 800px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

.board-shell {
  padding: 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, #7be6a6 0%, #34bd6b 49%, #23a858 50%, #32b867 100%);
  border: 1px solid #147a3d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 2px 6px rgba(12, 84, 42, 0.22);
}

.board-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 500 / 790;
  border-radius: 3px;
  background: linear-gradient(180deg, #fffde6 0%, #f5edc4 52%, #ece1ae 100%);
  border: 1px solid #8a7c4b;
  box-shadow: inset 0 1px 4px rgba(90, 78, 36, 0.24);
  overflow: hidden;
}

.board-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.board-layer {
  position: absolute;
  inset: 0;
}

.cell-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 16.4%;
  height: 5.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.cell-slot.is-camp {
  width: 11.8%;
  height: 6.4%;
  border-radius: 50%;
}

.target-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c2ffd4 0%, #24c454 55%, #128c36 100%);
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(10, 84, 30, 0.45);
  pointer-events: none;
}

.cell-slot.target-attack::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  border: 2.5px solid #e62222;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 6;
}

.cell-slot.target-danger::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  border: 2.5px dashed #e6ae00;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 6;
}

.cell-slot.last-action-cell::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  border: 2px solid #16b595;
  pointer-events: none;
  z-index: 1;
}

.piece-tile {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 2.1vw, 14px);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  overflow: hidden;
  transition: filter 0.16s ease, box-shadow 0.16s ease;
}

.piece-tile::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 46%;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.12) 100%);
  pointer-events: none;
}

.piece-tile span {
  position: relative;
  z-index: 1;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.38);
}

.piece-hidden {
  background: linear-gradient(180deg, #74f097 0%, #29c458 49%, #16a340 50%, #24b850 100%);
  border: 1px solid #0e732c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 2px 0 #0c6125,
    0 2px 3px rgba(8, 66, 26, 0.25);
}

.piece-red {
  background: linear-gradient(180deg, #ff9696 0%, #eb3434 49%, #c91414 50%, #de2323 100%);
  border: 1px solid #8f0c0c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 2px 0 #780a0a,
    0 2px 3px rgba(100, 10, 10, 0.25);
}

.piece-blue {
  background: linear-gradient(180deg, #8ceaff 0%, #26b8e6 49%, #1097c4 50%, #1eaed9 100%);
  border: 1px solid #0b6d8f;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.48),
    0 2px 0 #095975,
    0 2px 3px rgba(8, 76, 102, 0.25);
}

.cell-slot:hover .piece-tile:not(.selected) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 4px rgba(57, 197, 187, 0.55),
    0 2px 0 rgba(12, 82, 42, 0.45);
}

.cell-slot:active .piece-tile {
  filter: brightness(0.92);
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(0, 0, 0, 0.18);
  transition: none;
}

.piece-tile.selected {
  outline: 2px solid #ffe033;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 6px rgba(255, 214, 20, 0.85),
    0 2px 3px rgba(0, 0, 0, 0.22);
  z-index: 8;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panel-card {
  background: #f5fcfc;
  border: 1px solid #6ab2bd;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(14, 86, 97, 0.14);
  overflow: hidden;
}

.panel-title {
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(10, 88, 102, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.14) 49%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(135deg, #32bab0 0%, #24b3d6 100%);
  border-bottom: 1px solid #168699;
}

.panel-content {
  padding: 8px 10px;
}

.turn-box {
  padding: 6px 8px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #4d3a00;
  background: linear-gradient(180deg, #fffce0 0%, #fff0a3 100%);
  border: 1px solid #cfa50e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.turn-box.turn-red {
  color: #8a1111;
  background: linear-gradient(180deg, #fff2f2 0%, #ffd9d9 100%);
  border-color: #d95252;
}

.turn-box.turn-blue {
  color: #0b5870;
  background: linear-gradient(180deg, #effbff 0%, #ccf1fc 100%);
  border-color: #25a3c9;
}

.turn-box.turn-win {
  color: #0c5922;
  background: linear-gradient(180deg, #edfff1 0%, #c2f5ce 100%);
  border-color: #1fa847;
}

.notice-line {
  margin-top: 7px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #19454d;
  background: #ffffff;
  border: 1px solid #8fc7d1;
  border-top-color: #6ea9b5;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(14, 86, 97, 0.1);
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.team-box {
  padding: 6px 8px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.6;
}

.team-box-red {
  background: linear-gradient(180deg, #fff8f8 0%, #ffeaea 100%);
  border: 1px solid #e38181;
  color: #751313;
}

.team-box-blue {
  background: linear-gradient(180deg, #f5fdff 0%, #ddf6ff 100%);
  border: 1px solid #5ac0de;
  color: #0d5066;
}

.team-head {
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.action-row .ui-btn {
  flex: 1 1 100px;
}

.grave-box {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid #96c7bc;
  border-top-color: #73ad9f;
  box-shadow: inset 0 1px 2px rgba(14, 86, 70, 0.09);
  font-size: 12px;
  line-height: 1.55;
  color: #214539;
}

.sub-panel {
  display: none;
}

.sub-panel.visible {
  display: block;
}

.room-row {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.text-input {
  flex: 1;
  min-width: 0;
  padding: 4px 7px;
  font-size: 12.5px;
  font-family: inherit;
  border-radius: 2px;
  border: 1px solid #6eaab8;
  border-top-color: #4f8a99;
  background: #ffffff;
  color: #143f4a;
  box-shadow: inset 0 1px 2px rgba(12, 74, 86, 0.14);
  outline: none;
  user-select: text;
}

.text-input:focus {
  border-color: #1ba4bf;
  box-shadow: inset 0 1px 2px rgba(12, 74, 86, 0.12), 0 0 3px rgba(34, 186, 204, 0.45);
}

.room-badge-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
  padding: 5px 8px;
  border-radius: 2px;
  background: #fffce0;
  border: 1px solid #cfa817;
  color: #4f3c00;
  font-size: 12.5px;
  font-weight: 700;
}

.room-badge-row.visible {
  display: flex;
}

.offline-box {
  display: none;
  padding: 6px 8px;
  border-radius: 2px;
  background: #fffce8;
  border: 1px solid #cfb12b;
  color: #544300;
  font-size: 12px;
  line-height: 1.6;
}

.offline-box.visible {
  display: block;
}

.history-list {
  max-height: 205px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #89bec9;
  border-top-color: #669ea8;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(14, 86, 97, 0.12);
  font-size: 12px;
  line-height: 1.48;
}

.history-item {
  padding: 4px 7px;
  border-bottom: 1px solid #e4f2f5;
  color: #19434d;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:first-child {
  background: #fffbe0;
  color: #4d3b00;
  font-weight: 700;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(14, 52, 58, 0.38);
}

.modal-mask.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 490px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  background: #f5fcfc;
  border: 1px solid #157d8a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 8px 24px rgba(8, 56, 64, 0.42);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(8, 72, 82, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.16) 49%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(135deg, #2fb5ab 0%, #24b3d6 100%);
  border-bottom: 1px solid #137d8c;
}

.modal-body {
  padding: 11px 13px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.68;
  color: #193b42;
  background: #ffffff;
}

.modal-body p {
  margin: 0 0 8px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-foot {
  padding: 7px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  background: #e9f8fa;
  border-top: 1px solid #b5dfe6;
}

.theme-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.theme-option {
  text-align: left;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #8ec2cc;
  background: linear-gradient(180deg, #ffffff 0%, #f0fafb 100%);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

.theme-option:hover {
  border-color: #24a8b5;
  box-shadow: inset 0 0 0 2px #ffffff, 0 0 3px rgba(57, 197, 187, 0.4);
}

.theme-option:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 3px rgba(12, 82, 92, 0.22);
  transition: none;
}

.theme-option.selected {
  border-color: #1aa344;
  background: linear-gradient(180deg, #f4fff7 0%, #e4faea 100%);
}

.swatch-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.swatch-dot {
  width: 22px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.theme-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #163b42;
}

.theme-tag {
  display: none;
  padding: 2px 2px;
  font-size: 12px;
  font-weight: 700;
  color: #1eab48;
}

.theme-option.selected .theme-tag {
  display: inline-block;
}

.theme-option-desc {
  margin-top: 3px;
  font-size: 12px;
  color: #3d5f66;
}

.room-badge-text {
  font-family: "Consolas", monospace;
  font-size: 18px;
  font-weight: 700;
  color: #163b42;
}

/* 拟物3786听12大上局狂妄莎翁余地7683217阿斯顿法国红酒快乐863786738126738126832167836127836 */
body[data-theme="skeuo"] {
  background: #f2f2f2;
  color: #2a2a2a;
}

body[data-theme="skeuo"] .main-window {
  background: #ffffff;
  border: 1px solid #c7c7c7;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 其实这个是我抄的 AO3 的 */
body[data-theme="skeuo"] .top-bar {
  background: linear-gradient(180deg, #ab1616 0%, #990000 55%, #820000 100%);
  border-bottom: 1px solid #660000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

body[data-theme="skeuo"] .brand-title {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(70, 0, 0, 0.65);
}

body[data-theme="skeuo"] .brand-badge {
  background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
  border-color: #700000;
  color: #990000;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-theme="skeuo"] .mode-strip {
  background: linear-gradient(180deg, #f9f9f9 0%, #eaeaea 100%);
  border-bottom: 1px solid #cccccc;
}

body[data-theme="skeuo"] .mode-btn {
  color: #2a2a2a;
  border-color: #bbbbbb;
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 1px rgba(0, 0, 0, 0.06);
  text-shadow: 0 1px 0 #ffffff;
}

body[data-theme="skeuo"] .mode-btn:hover {
  border-color: #990000;
  color: #990000;
  background: linear-gradient(180deg, #ffffff 0%, #efefef 100%);
  box-shadow: inset 0 1px 0 #ffffff;
}

body[data-theme="skeuo"] .mode-btn:active {
  transform: translateY(1px);
  background: #e0e0e0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: none;
}

body[data-theme="skeuo"] .mode-btn.active {
  color: #ffffff;
  border-color: #730000;
  text-shadow: 0 -1px 0 rgba(70, 0, 0, 0.55);
  background: linear-gradient(180deg, #ad1818 0%, #940808 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

body[data-theme="skeuo"] .counter-chip {
  color: #444444;
  background: #ffffff;
  border: 1px solid #cccccc;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
}

body[data-theme="skeuo"] .ui-btn {
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 1px rgba(0, 0, 0, 0.08);
}

body[data-theme="skeuo"] .ui-btn:hover:not(:disabled) {
  filter: brightness(1.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.12);
}

body[data-theme="skeuo"] .ui-btn:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.95);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.24);
  transition: none;
}

body[data-theme="skeuo"] .btn-sky {
  background: linear-gradient(180deg, #3ba4bf 0%, #24859e 100%);
  border-color: #19687d;
}

body[data-theme="skeuo"] .btn-green {
  background: linear-gradient(180deg, #529c64 0%, #3a804b 100%);
  border-color: #2b6339;
}

body[data-theme="skeuo"] .btn-gold {
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e4 100%);
  border-color: #b5b5b5;
  color: #990000;
  text-shadow: 0 1px 0 #ffffff;
}

body[data-theme="skeuo"] .btn-red {
  background: linear-gradient(180deg, #b51f1f 0%, #940b0b 100%);
  border-color: #6e0606;
}

body[data-theme="skeuo"] .btn-pearl {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%);
  border-color: #b8b8b8;
  color: #2a2a2a;
  text-shadow: 0 1px 0 #ffffff;
}

body[data-theme="skeuo"] .board-shell {
  background: linear-gradient(180deg, #ececec 0%, #dcdcdc 100%);
  border: 1px solid #b8b8b8;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 0, 0.08);
}

body[data-theme="skeuo"] .board-stage {
  background: #fcfbf8;
  border: 1px solid #b0b0b0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

body[data-theme="skeuo"] .piece-tile::before {
  height: 36%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.12);
}

body[data-theme="skeuo"] .piece-hidden {
  background: linear-gradient(180deg, #569e68 0%, #3f8550 100%);
  border-color: #2c633a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #245230;
}

body[data-theme="skeuo"] .piece-red {
  background: linear-gradient(180deg, #bd2424 0%, #990c0c 100%);
  border-color: #6e0707;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 #590505;
}

body[data-theme="skeuo"] .piece-blue {
  background: linear-gradient(180deg, #32a1bd 0%, #1d8099 100%);
  border-color: #135e73;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 #0f4c5e;
}

body[data-theme="skeuo"] .cell-slot:hover .piece-tile:not(.selected) {
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 2px 0 rgba(0, 0, 0, 0.32);
}

body[data-theme="skeuo"] .panel-card {
  background: #fafafa;
  border: 1px solid #cccccc;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body[data-theme="skeuo"] .panel-title {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  color: #990000;
  text-shadow: 0 1px 0 #ffffff;
  background: linear-gradient(180deg, #f7f7f7 0%, #e8e8e8 100%);
  border-bottom: 1px solid #cccccc;
}

body[data-theme="skeuo"] .turn-box {
  background: #f5f5f5;
  border: 1px solid #cccccc;
  color: #333333;
}

body[data-theme="skeuo"] .turn-box.turn-red {
  background: #fdf2f2;
  border-color: #d9a3a3;
  color: #8c0a0a;
}

body[data-theme="skeuo"] .turn-box.turn-blue {
  background: #f0f9fc;
  border-color: #9ecfd9;
  color: #135b70;
}

body[data-theme="skeuo"] .turn-box.turn-win {
  background: #f0faf2;
  border-color: #99cfa5;
  color: #1f5e2e;
}

body[data-theme="skeuo"] .team-box-red {
  background: #ffffff;
  border: 1px solid #d6b2b2;
  color: #6e1414;
}

body[data-theme="skeuo"] .team-box-blue {
  background: #ffffff;
  border: 1px solid #a8d2de;
  color: #145469;
}

body[data-theme="skeuo"] .notice-line,
body[data-theme="skeuo"] .grave-box,
body[data-theme="skeuo"] .history-list,
body[data-theme="skeuo"] .text-input {
  background: #ffffff;
  border-color: #cccccc;
  border-top-color: #b5b5b5;
  color: #2a2a2a;
}

body[data-theme="skeuo"] .history-item {
  border-bottom-color: #ececec;
  color: #333333;
}

body[data-theme="skeuo"] .history-item:first-child {
  background: #f7f7f7;
  color: #990000;
}

body[data-theme="skeuo"] .modal-card {
  border: 1px solid #aaaaaa;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

body[data-theme="skeuo"] .modal-head {
  background: linear-gradient(180deg, #ab1616 0%, #990000 55%, #820000 100%);
  color: #ffffff;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  border-bottom-color: #660000;
}

body[data-theme="skeuo"] .modal-foot {
  background: #f2f2f2;
  border-top-color: #cccccc;
}

/* 扁平！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！*/
body[data-theme="flat"] {
  background: #e3ede6;
  color: #21382a;
}

body[data-theme="flat"] .main-window {
  background: #fcfbf7;
  border: 2px solid #526e5b;
  box-shadow: none;
  border-radius: 3px;
}

body[data-theme="flat"] .top-bar {
  background: #367d4f;
  border-bottom: 2px solid #28613c;
  box-shadow: none;
}

body[data-theme="flat"] .brand-title,
body[data-theme="flat"] .panel-title,
body[data-theme="flat"] .modal-head {
  text-shadow: none;
}

body[data-theme="flat"] .brand-badge {
  background: #f2c829;
  border-color: #c29e10;
  box-shadow: none;
}

body[data-theme="flat"] .mode-strip {
  background: #edf5ef;
  border-bottom: 2px solid #b9cfbf;
}

body[data-theme="flat"] .mode-btn {
  background: #ffffff;
  border: 1.5px solid #7c9e87;
  color: #264731;
  box-shadow: none;
}

body[data-theme="flat"] .mode-btn:hover {
  filter: brightness(0.97);
  box-shadow: none;
}

body[data-theme="flat"] .mode-btn.active {
  background: #f2c829;
  border-color: #bf9a0d;
  color: #3d3100;
  text-shadow: none;
  box-shadow: none;
}

body[data-theme="flat"] .counter-chip {
  background: #ffffff;
  border: 1.5px solid #8eb099;
  box-shadow: none;
  color: #244530;
}

body[data-theme="flat"] .ui-btn {
  box-shadow: none;
  text-shadow: none;
}

body[data-theme="flat"] .ui-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: none;
}

body[data-theme="flat"] .ui-btn:active:not(:disabled),
body[data-theme="flat"] .mode-btn:active,
body[data-theme="flat"] .cell-slot:active .piece-tile {
  transform: translateY(1px);
  filter: brightness(0.9);
  box-shadow: none;
}

body[data-theme="flat"] .btn-sky { background: #1e9ec9; border-color: #157da1; }
body[data-theme="flat"] .btn-green { background: #2da653; border-color: #1f803d; }
body[data-theme="flat"] .btn-gold { background: #f2c829; border-color: #bf9a0d; color: #3d3100; }
body[data-theme="flat"] .btn-red { background: #d93b34; border-color: #ab2620; } /* 我去你妈的吧。*/
body[data-theme="flat"] .btn-pearl { background: #ffffff; border-color: #7c9e87; color: #244530; }

body[data-theme="flat"] .board-shell {
  background: #48855d;
  border: 2px solid #2e5c3e;
  box-shadow: none;
}

body[data-theme="flat"] .board-stage {
  background: #f5efd8;
  border: 2px solid #8a8364;
  box-shadow: none;
}

body[data-theme="flat"] .piece-tile {
  box-shadow: none;
}

body[data-theme="flat"] .piece-tile::before {
  display: none;
}

body[data-theme="flat"] .piece-tile span {
  text-shadow: none;
}

body[data-theme="flat"] .piece-hidden {
  background: #3aa35a;
  border: 1.5px solid #25753e;
}

body[data-theme="flat"] .piece-red {
  background: #d93b34;
  border: 1.5px solid #a1221c;
}

body[data-theme="flat"] .piece-blue {
  background: #1d9cc7;
  border: 1.5px solid #137496;
}

body[data-theme="flat"] .cell-slot:hover .piece-tile:not(.selected) {
  filter: brightness(1.06);
  box-shadow: none;
}

body[data-theme="flat"] .panel-card {
  background: #ffffff;
  border: 1.5px solid #9db8a6;
  box-shadow: none;
}

body[data-theme="flat"] .panel-title {
  background: #3c8254;
  border-bottom: 1.5px solid #2b633f;
}

body[data-theme="flat"] .turn-box,
body[data-theme="flat"] .notice-line,
body[data-theme="flat"] .grave-box,
body[data-theme="flat"] .history-list {
  box-shadow: none;
}

body[data-theme="flat"] .modal-card {
  border: 2px solid #367d4f;
  box-shadow: none;
}

body[data-theme="flat"] .modal-head {
  background: #367d4f;
  border-bottom-color: #28613c;
}

body[data-theme="flat"] .modal-foot {
  background: #edf5ef;
  border-top-color: #bdd4c4;
}


/* 诶你们知道吗这个格式化甘肃太好用了。 */