/* 数字华容道 · 独立样式（选择器统一前缀 .g-slide15） */

.g-slide15 {
  justify-content: center;
}

/* ---------------- 顶部：阶数分段 ---------------- */

.g-slide15 .s15-head {
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.g-slide15 .s15-head .grow { width: 100%; }
.g-slide15 .s15-head .seg { width: 100%; padding: 4px; }
.g-slide15 .s15-head .seg-item { min-height: 40px; font-size: 12.5px; }

/* ---------------- 数据 ---------------- */

.g-slide15 .stats { gap: 8px; }
.g-slide15 .stat { padding: 9px 6px; }
.g-slide15 .stat-v { font-size: 17px; }

/* ---------------- 棋盘 ---------------- */

.g-slide15 .s15-boardwrap {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-slide15 .s15-board {
  position: relative;
  width: clamp(216px, calc(100dvh - 392px), 100%);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(163, 230, 53, 0.08), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 54px -32px rgba(0, 0, 0, 0.95);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  font-size: 80px;
}

.g-slide15 .s15-slots {
  position: absolute;
  inset: 6px;
  display: grid;
  gap: 6px;
}

.g-slide15 .s15-slot {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.g-slide15 .s15-tiles { position: absolute; inset: 0; }

.g-slide15 .s15-tile {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #e9f6d2;
  background: linear-gradient(160deg, rgba(163, 230, 53, 0.16), rgba(163, 230, 53, 0.055));
  border: 1px solid rgba(163, 230, 53, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition:
    left 0.11s cubic-bezier(0.2, 0.8, 0.3, 1),
    top 0.11s cubic-bezier(0.2, 0.8, 0.3, 1),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  will-change: left, top;
}

/* 大号等宽数字（1em = 格子像素） */
.g-slide15 .s15-tile[data-len="1"] { font-size: 0.4em; }
.g-slide15 .s15-tile[data-len="2"] { font-size: 0.33em; }

/* 已归位：绿色高亮，帮助建立空间反馈 */
.g-slide15 .s15-tile.ok {
  background: linear-gradient(160deg, rgba(163, 230, 53, 0.34), rgba(95, 158, 19, 0.18));
  border-color: rgba(163, 230, 53, 0.5);
  color: #f4ffe4;
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.g-slide15 .s15-tile:active { filter: brightness(1.15); }

.g-slide15 .s15-board[data-size="5"] .s15-tile,
.g-slide15 .s15-board[data-size="5"] .s15-slot { border-radius: 10px; }

.g-slide15 .s15-board[data-size="3"] .s15-tile,
.g-slide15 .s15-board[data-size="3"] .s15-slot { border-radius: 14px; }

/* ---------------- 结算覆盖层 ---------------- */

.g-slide15 .s15-over {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 11, 18, 0.84);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
}

.g-slide15 .s15-over.show { opacity: 1; visibility: visible; }

.g-slide15 .s15-over-card {
  width: 100%;
  max-width: 254px;
  text-align: center;
}

.g-slide15 .s15-over-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.g-slide15 .s15-over-sub {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--dim);
}

.g-slide15 .s15-over-stats {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.g-slide15 .s15-over-stat {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.g-slide15 .s15-over-stat span {
  display: block;
  font-size: 10px;
  color: var(--faint);
  margin-bottom: 2px;
}

.g-slide15 .s15-over-stat b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-slide15 .s15-over .btn { min-height: 44px; }

/* ---------------- 操作行 / 最佳面板 ---------------- */

.g-slide15 .s15-toolbar .btn { min-height: 44px; }

.g-slide15 .s15-meta { padding: 11px 12px 12px; }
.g-slide15 .s15-meta-head { align-items: baseline; gap: 8px; }
.g-slide15 .s15-meta-head .hint:first-child {
  color: var(--dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.g-slide15 .s15-meta-head .hint:last-child { flex: none; }
.g-slide15 .s15-meta .progress { height: 5px; }
.g-slide15 .s15-meta .hint.mt-8 { font-size: 10.8px; line-height: 1.55; }

/* ---------------- 窄屏 ---------------- */

@media (max-width: 359px) {
  .g-slide15 .s15-head .seg-item { font-size: 11.5px; }
  .g-slide15 .stat-v { font-size: 16px; }
  .g-slide15 .s15-tile[data-len="1"] { font-size: 0.37em; }
}
