:root {
  --color-bg: #0d1b3d;
  --color-bg-panel: #14285c;
  --color-text: #ffffff;
  --color-accent: #ffcb3d;
  --color-accent-dark: #d69f00;
  --color-good: #4caf50;
  --color-button: #1f3a7a;
  --color-button-border: #ffcb3d;
  --font-base: 24px;
  --font-heading: 36px;
  --btn-min: 80px;
  --btn-main: 120px;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Yu Gothic", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  user-select: none;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-size: var(--font-heading);
  margin: 0.4em 0;
  text-align: center;
  color: var(--color-accent);
}

button {
  font-family: inherit;
  font-size: var(--font-base);
  min-width: var(--btn-min);
  min-height: var(--btn-min);
  padding: 12px 20px;
  background: var(--color-button);
  color: var(--color-text);
  border: 4px solid var(--color-button-border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}

button:active {
  transform: scale(0.95);
  background: var(--color-accent-dark);
}

button.btn-main {
  min-width: var(--btn-main);
  min-height: var(--btn-main);
  font-size: 28px;
  font-weight: bold;
}

.btn-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  background: var(--color-bg-panel);
}

.screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.hud {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: var(--color-bg-panel);
  border: 3px solid var(--color-accent);
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 28px;
  text-align: right;
}

.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 61, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  text-align: center;
  padding: 24px;
}

.result-stamp {
  font-size: 64px;
  color: var(--color-accent);
  margin-bottom: 12px;
  animation: pop-in 0.4s ease;
}

.result-message {
  font-size: 32px;
  margin-bottom: 24px;
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.feedback-gentle {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-panel);
  border: 3px solid var(--color-accent);
  border-radius: 16px;
  padding: 16px 28px;
  font-size: 28px;
  z-index: 1500;
  animation: fade-in-out 1.6s ease forwards;
  pointer-events: none;
}

@keyframes fade-in-out {
  0% { opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.choice-grid {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin-top: 24px;
}

.choice-btn {
  min-height: var(--btn-main);
  font-size: 30px;
}

canvas {
  touch-action: manipulation;
  background: #a9d8ff;
  border-radius: 12px;
  max-width: 100%;
}

#launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1100px;
  margin-top: 16px;
}

.game-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.3;
}

.game-tile-emoji {
  font-size: 56px;
}

.game-tile-label {
  text-align: center;
}

.game-screen-inner {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

