html, body {
    position: fixed;
    width: 100%;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: none;
}
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#canvas {
    display: block;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
}
#center-cam-btn {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 20;
  background-color: rgba(20, 36, 51, 0.94);
  border: 3px solid #090d12;
  border-radius: 8px;
  color: #ffd166;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 7px 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 #090d12;
}

#center-cam-btn:active {
  transform: translateX(-50%) translateY(2px);
  box-shadow: 0 1px 0 #090d12;
}

#center-cam-btn.hidden {
  display: none;
}

#input-bar {
  position: fixed;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  max-width: calc(100vw - 24px);
}

#wordInput {
  min-width: 0;
  flex: 1;
}

#wordInput,
#linkBtn {
  background-color: #142433;
  border: 3px solid #090d12;
  border-radius: 6px;
  color: #e6edf3;
  font-family: monospace;
  font-size: 18px;
  padding: 10px 14px;
  outline: none;
}

#wordInput::placeholder {
  color: #7d8b99;
}

#start-menu {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  font-family: monospace;
}

#start-menu.hidden {
  display: none;
}

#start-top {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#start-brand {
  text-align: center;
}

#start-title {
  font-size: clamp(36px, 8vw, 64px);
  font-weight: bold;
  letter-spacing: 3px;
  color: #f4f8fb;
  text-shadow: 4px 4px 0 #090d12, -2px -2px 0 #090d12, 2px -2px 0 #090d12, -2px 2px 0 #090d12;
}

#start-sub {
  font-size: clamp(13px, 2.5vw, 17px);
  font-weight: bold;
  color: #142433;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

#start-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hud-pill {
  background-color: rgba(20, 36, 51, 0.92);
  border: 3px solid #090d12;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #f4f8fb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.streak-pill {
  color: #ffd166;
}

.coin-pill {
  color: #ffd166;
}

.coin-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: #ffd166;
  border: 2px solid #090d12;
  display: inline-block;
}

#start-left-dock {
  position: absolute;
  left: 50%;
  bottom: 158px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: auto;
}

.dock-tile {
  flex: 1;
  background-color: rgba(20, 36, 51, 0.94);
  border: 3px solid #090d12;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f4f8fb;
  font-family: monospace;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.dock-tile:hover {
  transform: translateY(-2px);
  border-color: #8ecae6;
}

.dock-tile.can-spin {
  border-color: #ffd166;
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.45);
}

.dock-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2.5px solid #090d12;
  background-color: #ffd166;
  color: #142433;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-spin-icon {
  animation: coinBob 1.8s ease-in-out infinite;
}

@keyframes coinBob {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(-2px) scaleX(0.72); }
}

#chars-btn-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background-color: #182c3e;
  border: 2.5px solid #090d12;
  border-radius: 8px;
  image-rendering: pixelated;
}

.dock-info {
  min-width: 0;
}

.dock-label {
  font-size: 14px;
  font-weight: bold;
  color: #f4f8fb;
}

.dock-sub {
  font-size: 11px;
  font-weight: bold;
  color: #8ecae6;
}

#start-bottom-cta {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

#start-play-wrap {
  position: relative;
  width: 100%;
}

#start-play-row {
  display: flex;
  width: 100%;
}

#start-play-btn {
  flex: 1;
  min-width: 0;
  background-color: #3b92cf;
  border: 4px solid #090d12;
  border-right: 2px solid #090d12;
  border-radius: 10px 0 0 10px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 22px;
  font-weight: bold;
  padding: 13px 14px;
  cursor: pointer;
  box-shadow: 0 5px 0 #090d12;
  transition: transform 0.1s ease;
}

#start-mode-toggle {
  width: 48px;
  flex-shrink: 0;
  background-color: #2b7bb9;
  border: 4px solid #090d12;
  border-left: 2px solid #090d12;
  border-radius: 0 10px 10px 0;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 0 #090d12;
  transition: transform 0.1s ease;
}

#start-play-btn:active,
#start-mode-toggle:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #090d12;
}

#mode-dropup {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  background-color: rgba(20, 36, 51, 0.98);
  border: 4px solid #090d12;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 6px 0 #090d12;
}

#mode-dropup.hidden {
  display: none;
}

.mode-option {
  width: 100%;
  background-color: rgba(14, 26, 38, 0.95);
  border: 3px solid #090d12;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: monospace;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, transform 0.1s ease;
}

.mode-option:hover {
  border-color: #ffd166;
  transform: translateY(-1px);
}

.mode-option-title {
  font-size: 16px;
  font-weight: bold;
  color: #ffd166;
}

.mode-option-sub {
  font-size: 12px;
  font-weight: bold;
  color: #8ecae6;
}

#start-how {
  font-size: 12px;
  font-weight: bold;
  color: #f4f8fb;
  text-shadow: 1px 1px 0 #090d12;
  text-align: center;
}

@media (min-width: 720px) and (orientation: landscape) {
  #start-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  #start-brand {
    text-align: left;
  }

  #start-left-dock {
    left: 24px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    width: 220px;
    gap: 14px;
  }

  .dock-tile {
    padding: 13px 14px;
  }

  .dock-label {
    font-size: 16px;
  }

  #start-bottom-cta {
    left: 24px;
    bottom: 84px;
    transform: none;
    width: 240px;
    align-items: flex-start;
  }

  #start-how {
    text-align: left;
  }
}

.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  background-color: rgba(9, 13, 18, 0.78);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.overlay-modal.hidden {
  display: none;
}

#shop-panel,
#chars-panel,
#endless-panel {
  margin: auto;
  width: min(440px, 100%);
  background-color: rgba(20, 36, 51, 0.97);
  border: 4px solid #090d12;
  border-radius: 14px;
  padding: 18px;
  box-sizing: border-box;
  font-family: monospace;
  color: #f4f8fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#endless-sub {
  width: 100%;
  font-size: 13px;
  font-weight: bold;
  color: #8ecae6;
  text-align: left;
}

#endless-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.endless-mod-card {
  background-color: rgba(14, 26, 38, 0.92);
  border: 3px solid #090d12;
  border-radius: 10px;
  padding: 12px 10px;
  color: #f4f8fb;
  font-family: monospace;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: border-color 0.12s ease, transform 0.1s ease;
}

.endless-mod-card:hover {
  border-color: #8ecae6;
  transform: translateY(-1px);
}

.endless-mod-card.active {
  border-color: #ffd166;
  background-color: rgba(27, 50, 71, 0.96);
}

.endless-mod-card.wide {
  grid-column: 1 / -1;
}

.endless-mod-name {
  font-size: 14px;
  font-weight: bold;
  color: #f4f8fb;
}

.endless-mod-card.wide .endless-mod-name {
  color: #ffd166;
}

.endless-mod-desc {
  font-size: 11px;
  font-weight: bold;
  color: #8ecae6;
}

#endless-play-btn {
  width: 100%;
  background-color: #3b92cf;
  border: 3px solid #090d12;
  border-radius: 10px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #090d12;
}

#endless-play-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #090d12;
}

#chars-panel {
  width: min(calc(var(--chars-cols, 3) * 195px + 70px), 100%);
}

.modal-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title {
  font-size: 22px;
  font-weight: bold;
  color: #ffd166;
}

.modal-close {
  background-color: #1c3347;
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 6px 11px;
  cursor: pointer;
}

#wheel-stage {
  position: relative;
  width: min(320px, calc(100vw - 68px));
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

#wheel-result {
  position: absolute;
  inset: 12px;
  background-color: rgba(14, 26, 38, 0.96);
  border: 4px solid #ffd166;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  animation: popReveal 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}

#wheel-result.hidden {
  display: none;
}

@keyframes popReveal {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#wheel-win-sprite {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
}

#wheel-win-rarity {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 2px solid #090d12;
}

#wheel-win-name {
  font-size: 20px;
  font-weight: bold;
  color: #f4f8fb;
}

#wheel-win-status {
  font-size: 13px;
  font-weight: bold;
  color: #ffd166;
}

#wheel-win-ok {
  background-color: #3b92cf;
  border: 3px solid #090d12;
  border-radius: 8px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 8px 20px;
  cursor: pointer;
}

#wheel-ticker {
  font-size: 15px;
  font-weight: bold;
  color: #8ecae6;
  min-height: 20px;
}

#spin-btn {
  width: 100%;
  background-color: #ffd166;
  border: 3px solid #090d12;
  border-radius: 10px;
  color: #142433;
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 16px;
  cursor: pointer;
}

#spin-btn:disabled {
  background-color: #334155;
  color: #94a3b8;
  cursor: not-allowed;
}

#shop-odds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: bold;
}

.odds-common { color: #8ecae6; }
.odds-rare { color: #c084fc; }
.odds-epic { color: #fb923c; }

#chars-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  #chars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  #chars-grid {
    grid-template-columns: repeat(var(--chars-cols, 4), minmax(0, 1fr));
  }
}

.char-card {
  background-color: rgba(14, 26, 38, 0.92);
  border: 3px solid #090d12;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.char-card.equipped {
  border-color: #ffd166;
}

.char-card-canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.char-card-name {
  font-size: 16px;
  font-weight: bold;
  color: #f4f8fb;
}

.char-rarity {
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 5px;
  border: 2px solid #090d12;
}

.rarity-common { background-color: #2b7bb9; color: #f4f8fb; }
.rarity-rare { background-color: #7e22ce; color: #f4f8fb; }
.rarity-epic { background-color: #ea580c; color: #fff7ed; }

.char-action-btn {
  width: 100%;
  background-color: #3b92cf;
  border: 2.5px solid #090d12;
  border-radius: 7px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 10px;
  cursor: pointer;
}

.char-action-btn.is-equipped {
  background-color: #ffd166;
  color: #142433;
}

.char-action-btn:disabled {
  background-color: #1e293b;
  color: #94a3b8;
  cursor: not-allowed;
}

#game-menu-btn {
  position: fixed;
  top: 56px;
  right: 58px;
  height: 30px;
  z-index: 20;
  background-color: rgba(20, 36, 51, 0.92);
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-menu-btn:active {
  background-color: #182c3e;
}

#hint-wrap {
  position: fixed;
  top: 56px;
  right: 20px;
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#skip-btn {
  position: fixed;
  top: 94px;
  right: 20px;
  z-index: 19;
  background-color: rgba(20, 36, 51, 0.94);
  border: 2.5px solid #ffd166;
  border-radius: 7px;
  color: #ffd166;
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 #090d12;
}

#skip-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #090d12;
}

#skip-btn.hidden {
  display: none;
}

#hint-btn {
  width: 30px;
  height: 30px;
  background-color: rgba(20, 36, 51, 0.92);
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #8ecae6;
  font-family: monospace;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#hint-box {
  display: none;
  margin-top: 8px;
  width: min(320px, calc(100vw - 32px));
  background-color: rgba(20, 36, 51, 0.96);
  border: 3px solid #090d12;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.45;
  box-sizing: border-box;
  word-wrap: break-word;
}

#hint-wrap.hover-open #hint-box,
#hint-wrap.click-open #hint-box {
  display: block;
}

.hint-line + .hint-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(142, 202, 230, 0.2);
}

.hint-word {
  color: #8ecae6;
  font-weight: bold;
}

.hint-def {
  color: #f4f8fb;
}

#recap-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background-color: rgba(9, 13, 18, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

#recap-modal.hidden {
  display: none;
}

#recap-panel {
  margin: auto;
  width: 100%;
  max-width: 960px;
  background-color: rgba(20, 36, 51, 0.96);
  border: 4px solid #090d12;
  border-radius: 12px;
  padding: 18px;
  box-sizing: border-box;
  font-family: monospace;
  color: #f4f8fb;
}

#recap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#recap-title {
  font-size: 22px;
  font-weight: bold;
  color: #f4f8fb;
}

#recap-header-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

#recap-share {
  background-color: #ffd166;
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #142433;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 6px 11px;
  cursor: pointer;
}

#recap-share.hidden {
  display: none;
}

#recap-menu {
  background-color: #2b7bb9;
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 6px 11px;
  cursor: pointer;
}

#share-panel {
  margin: auto;
  width: min(440px, 100%);
  background-color: rgba(20, 36, 51, 0.98);
  border: 4px solid #090d12;
  border-radius: 14px;
  padding: 18px;
  box-sizing: border-box;
  font-family: monospace;
  color: #f4f8fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#share-preview {
  width: 100%;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
  background-color: rgba(14, 26, 38, 0.95);
  border: 3px solid #090d12;
  border-radius: 10px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

#share-status {
  min-height: 18px;
  font-size: 13px;
  font-weight: bold;
  color: #ffd166;
  text-align: center;
}

#share-btns {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.share-action-btn {
  background-color: #1c3347;
  border: 3px solid #090d12;
  border-radius: 9px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  padding: 11px 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 #090d12;
}

.share-action-btn.share-primary {
  background-color: #ffd166;
  color: #142433;
}

.share-action-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #090d12;
}

#recap-close {
  background-color: #1c3347;
  border: 2.5px solid #090d12;
  border-radius: 6px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 6px 11px;
  cursor: pointer;
}

#recap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) and (orientation: landscape) {
  #recap-modal {
    align-items: center;
  }

  #recap-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.recap-card {
  background-color: rgba(14, 26, 38, 0.9);
  border: 3px solid #090d12;
  border-radius: 10px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-sizing: border-box;
}

.recap-pair {
  font-size: 16px;
  font-weight: bold;
  color: #8ecae6;
  word-break: break-word;
}

.recap-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.recap-star {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
}

.recap-star.dim {
  opacity: 0.35;
}

.recap-replay-btn {
  width: 100%;
  background-color: #3b92cf;
  border: 3px solid #090d12;
  border-radius: 8px;
  color: #f4f8fb;
  font-family: monospace;
  font-size: 17px;
  font-weight: bold;
  padding: 12px 14px;
  cursor: pointer;
}

.recap-reveal-btn {
  width: 78%;
  background-color: #182c3e;
  border: 2.5px solid #090d12;
  border-radius: 7px;
  color: #cbd5e1;
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 10px;
  cursor: pointer;
}

.recap-answer {
  font-size: 13px;
  font-weight: bold;
  color: #ffd166;
  background-color: rgba(9, 13, 18, 0.5);
  border: 2px solid #090d12;
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.recap-locked {
  font-size: 14px;
  font-weight: bold;
  color: #94a3b8;
  padding: 10px 0;
}

#confirm-quit-panel,
#confirm-skip-panel {
  margin: auto;
  width: min(360px, 100%);
  background-color: rgba(20, 36, 51, 0.97);
  border: 4px solid #090d12;
  border-radius: 14px;
  padding: 20px 18px;
  box-sizing: border-box;
  font-family: monospace;
  color: #f4f8fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

#confirm-quit-text,
#confirm-skip-text {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.45;
  color: #f4f8fb;
}

#confirm-quit-btns,
#confirm-skip-btns {
  width: 100%;
  display: flex;
  gap: 10px;
}

#confirm-quit-yes-btn,
#confirm-quit-no-btn,
#confirm-skip-yes-btn,
#confirm-skip-no-btn {
  flex: 1;
  border: 3px solid #090d12;
  border-radius: 9px;
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 #090d12;
}

#confirm-quit-yes-btn {
  background-color: #ff5c5c;
  color: #f4f8fb;
}

#confirm-skip-yes-btn {
  background-color: #ffd166;
  color: #142433;
}

#confirm-quit-no-btn,
#confirm-skip-no-btn {
  background-color: #3b92cf;
  color: #f4f8fb;
}

#confirm-quit-yes-btn:active,
#confirm-quit-no-btn:active,
#confirm-skip-yes-btn:active,
#confirm-skip-no-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #090d12;
}

#tutorial-prompt-panel {
  margin: auto;
  width: min(360px, 100%);
  background-color: rgba(20, 36, 51, 0.97);
  border: 4px solid #090d12;
  border-radius: 14px;
  padding: 20px 18px;
  box-sizing: border-box;
  font-family: monospace;
  color: #f4f8fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

#tutorial-prompt-text {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.45;
  color: #f4f8fb;
}

#tutorial-prompt-btns {
  width: 100%;
  display: flex;
  gap: 10px;
}

#tutorial-yes-btn,
#tutorial-no-btn {
  flex: 1;
  border: 3px solid #090d12;
  border-radius: 9px;
  font-family: monospace;
  font-size: 17px;
  font-weight: bold;
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 #090d12;
}

#tutorial-yes-btn {
  background-color: #3b92cf;
  color: #f4f8fb;
}

#tutorial-no-btn {
  background-color: #182c3e;
  color: #cbd5e1;
}

#tutorial-yes-btn:active,
#tutorial-no-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #090d12;
}

#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  font-family: monospace;
}

#tutorial-overlay.hidden {
  display: none;
}

#tutorial-overlay.mode-tap {
  pointer-events: auto;
  cursor: pointer;
}

#tutorial-overlay.no-spotlight {
  background-color: rgba(9, 13, 18, 0.58);
}

#tutorial-spotlight {
  position: fixed;
  pointer-events: none;
  border: 3px solid #ffd166;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(9, 13, 18, 0.72), 0 0 18px rgba(255, 209, 102, 0.6);
  box-sizing: border-box;
}

#tutorial-spotlight.hidden {
  display: none;
}

#tutorial-card {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(330px, calc(100vw - 28px));
  background-color: rgba(20, 36, 51, 0.97);
  border: 3px solid #090d12;
  border-radius: 12px;
  padding: 14px 16px;
  box-sizing: border-box;
  box-shadow: 0 5px 0 #090d12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

#tutorial-text {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.45;
  color: #f4f8fb;
}

#tutorial-hint {
  font-size: 12px;
  font-weight: bold;
  color: #ffd166;
}
