* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Courier New', monospace;
  background: #0a0a0a;
  color: #c8a84b;
  min-height: 100vh;
}

.ss-launch {
  max-width: 540px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.ss-credit { font-size: 0.7rem; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 8px; }
.ss-launch h1 { font-size: 1.6rem; color: #8b0000; margin-bottom: 16px; }
.ss-desc { font-size: 0.9rem; line-height: 1.5; color: #aaa; margin-bottom: 16px; }

.ss-rules {
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #888;
  margin: 0 0 24px 20px;
}

#ss-start {
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #8b0000;
  color: #f0d880;
  border: 1px solid #c8a84b;
  cursor: pointer;
}

.ss-back {
  display: inline-block;
  margin: 24px 12px 0;
  color: #666;
  font-size: 0.8rem;
  text-decoration: none;
}

.ss-back:hover { color: #c8a84b; }

/* ── Game ── */
.ss-game {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 32px;
}

.ss-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.ss-game-header a { color: #888; text-decoration: none; }
.ss-game-header a:hover { color: #c8a84b; }

.ss-restart {
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.72rem;
  background: transparent;
  color: #c8a84b;
  border: 1px solid rgba(200, 168, 75, 0.4);
  cursor: pointer;
}

.ss-objective {
  text-align: center;
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 16px;
  line-height: 1.45;
  padding: 10px 14px;
  border: 1px solid rgba(200, 168, 75, 0.25);
  border-radius: 8px;
  background: rgba(20, 10, 10, 0.6);
}

.ss-objective strong { color: #f0d880; }

.ss-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  min-height: 340px;
}

.ss-screen {
  flex: 1 1 320px;
  max-width: 440px;
  padding: 14px;
  border: 3px solid;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.ss-screen--left {
  background: #1a1a2e;
  border-color: #6688cc;
  color: #aad;
}

.ss-screen--right {
  background: #1a0a0a;
  border-color: #cc4444;
  color: #faa;
}

.ss-screen h2 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.ss-screen canvas {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 400 / 280;
  margin: 0 auto;
  border: 2px solid currentColor;
  image-rendering: pixelated;
  background: #000;
}

.ss-screen-tip {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 10px;
  line-height: 1.35;
}

/* Draggable gap between screens */
.ss-split {
  flex: 0 0 auto;
  min-width: 8px;
  max-width: 220px;
  background: repeating-linear-gradient(
    90deg,
    #111 0 6px,
    #222 6px 12px
  );
  border-top: 3px solid #444;
  border-bottom: 3px solid #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s;
}

.ss-split.is-pit {
  background: repeating-linear-gradient(
    90deg,
    #200 0 6px,
    #400 6px 12px
  );
}

.ss-split-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #f0d880;
  background: #8b0000;
  border: 2px solid #c8a84b;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ss-split-handle:active { cursor: grabbing; }

.ss-split-grip { font-size: 1.2rem; line-height: 1; }

.ss-split-gap {
  position: absolute;
  bottom: 8px;
  font-size: 0.62rem;
  color: #888;
  white-space: nowrap;
}

.ss-hud {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.85rem;
}

#ss-drops { color: #6a6; }
#ss-strikes { color: #c66; }

.ss-banner {
  text-align: center;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: bold;
  border-radius: 6px;
  animation: ss-banner-pop 0.35s ease;
}

.ss-banner--strike {
  background: rgba(139, 0, 0, 0.5);
  color: #faa;
  border: 1px solid #c44;
}

.ss-banner--drop {
  background: rgba(0, 80, 40, 0.5);
  color: #afa;
  border: 1px solid #4a4;
}

.ss-banner--hint {
  background: rgba(40, 40, 80, 0.5);
  color: #aad;
  border: 1px solid #68c;
}

@keyframes ss-banner-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ss-overlay,
.ss-tutorial {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.ss-overlay[hidden],
.ss-tutorial[hidden] {
  display: none !important;
}

.ss-overlay-box,
.ss-tutorial-box {
  text-align: center;
  padding: 28px 24px;
  border: 1px solid #c8a84b;
  background: #0a0a0a;
  max-width: 420px;
  width: 100%;
}

.ss-tutorial-box { text-align: left; }

.ss-tutorial-box h2 {
  text-align: center;
  font-size: 1.2rem;
  color: #8b0000;
  margin-bottom: 16px;
}

.ss-tutorial-box ol {
  margin: 0 0 20px 20px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #bbb;
}

.ss-tutorial-box li { margin-bottom: 8px; }
.ss-tutorial-box strong { color: #f0d880; }

.ss-overlay-box h2 {
  font-size: 1.4rem;
  color: #8b0000;
  margin-bottom: 12px;
}

.ss-overlay-box p {
  font-size: 0.88rem;
  color: #aaa;
  margin-bottom: 20px;
  line-height: 1.45;
}

.ss-overlay-box button,
.ss-tutorial-box button,
#ss-tutorial-go {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-family: inherit;
  background: #8b0000;
  color: #f0d880;
  border: 1px solid #c8a84b;
  cursor: pointer;
  font-size: 0.9rem;
}

.ss-screen--strike canvas {
  animation: ss-shake 0.4s ease;
}

@keyframes ss-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 800px) {
  .ss-stage {
    flex-direction: column;
    align-items: center;
    min-height: auto;
  }

  .ss-split {
    width: 100% !important;
    max-width: 400px;
    min-height: 56px;
    flex-direction: row;
    border-top: none;
    border-bottom: none;
    border-left: 3px solid #444;
    border-right: 3px solid #444;
  }

  .ss-split-gap {
    position: static;
    margin-left: 8px;
  }

  .ss-screen {
    width: 100%;
    max-width: 400px;
  }
}
