/* Web page: gamebox container */
.ct-gamebox {
  position: relative;
  min-height: 560px;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 56px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 90%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 50% 30%, rgba(34, 197, 94, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(30, 58, 138, 0.15) 0%, transparent 65%),
    linear-gradient(180deg, #0c1222 0%, #1e293b 40%, #0f172a 70%, #0c1222 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    inset 0 0 150px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.1);
}

.ct-gamebox::before {
  content: "Character World";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #e7efff;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.4);
  pointer-events: none;
  z-index: 3;
}

.ct-gamebox #ctgm-root-container-ss {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.ct-gamebox #ctgm-root-container-ss * {
  box-sizing: border-box;
}

#ss-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ss-sprite {
  position: absolute;
  width: 100px;
  height: 100px;
  transform-origin: center center;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
  touch-action: none;
}

#ss-panel {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: grid;
  grid-auto-flow: row;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(15, 20, 35, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #fff;
  z-index: 10;
  pointer-events: auto;
  text-align: center;
  min-width: 280px;
  font-weight: 500;
}

.ss-row {
  display: grid;
  grid-auto-flow: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.ss-btn {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  font-weight: 600;
  transition: all 0.2s ease;
  background: rgba(100, 116, 139, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.ss-btn:hover:not([disabled]) {
  background: rgba(100, 116, 139, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
}

#ss-mode-chaos.ss-btn.active,
#ss-mode-saver.ss-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
}

#ss-less.ss-btn { background: rgba(100, 116, 139, 0.5); }
#ss-more.ss-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
}

#ss-more.ss-btn:hover:not([disabled]) {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

#ss-count.ss-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  min-width: 52px;
  font-size: 16px;
  cursor: default;
}

.ss-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

#ss-close { display: none; }
