* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #03040f; color: #fff; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }

#app { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#stage { position: relative; width: 100vw; max-width: 100vw; aspect-ratio: 2 / 3; overflow: hidden; }
#game { display: block; width: 100%; height: 100%; touch-action: none; image-rendering: pixelated; }

#bar { width: 100%; max-width: 100vw; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; min-height: 40px; }
.icon { background: #141a46; color: #fff; border: 1px solid #2c3580; border-radius: 8px; padding: 6px 10px; font-size: 15px; cursor: pointer; }
.footer { font-size: 11px; color: #8890c0; text-align: center; flex: 1; }
.footer a { color: #9fdcff; text-decoration: none; }

.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.7em; padding: 1.5em 1.5em 5em; text-align: center; background: rgba(5, 8, 28, 0.84);
  animation: fadeIn 0.25s ease-out;
}
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

.logo { display: flex; flex-direction: column; line-height: 0.95; font-family: Impact, "Arial Black", sans-serif; letter-spacing: 0.04em; margin-bottom: 0.3em; }
.logo span { font-size: 3.4em; color: #ffd60a; -webkit-text-stroke: 0.06em #000; paint-order: stroke fill; text-shadow: 0 0.08em 0 #000, 0 0 0.4em rgba(255, 214, 10, 0.5); }
.logo .muro { color: #ff8a1f; text-shadow: 0 0.08em 0 #000, 0 0 0.4em rgba(255, 138, 31, 0.5); }
.logo small { font-size: 1.3em; color: #22e3ff; }
.record { color: #ffd60a; font-weight: bold; }
.name { display: flex; flex-direction: column; gap: 0.3em; font-size: 0.9em; color: #b9c0ee; }
.name input { font-size: 1.1em; padding: 0.45em 0.7em; border-radius: 0.5em; border: 2px solid #2c3580; background: #0d1236; color: #fff; text-align: center; width: 12em; user-select: text; -webkit-user-select: text; }
.help { font-size: 0.75em; color: #8890c0; max-width: 22em; }

.btn {
  font: bold 1.1em Arial, sans-serif; min-width: 12em; padding: 0.7em 1.2em; border-radius: 0.7em; cursor: pointer;
  border: 0.15em solid #000; background: #22e3ff; color: #03121a; box-shadow: 0 0.25em 0 #000;
}
.btn:active { transform: translateY(0.15em); box-shadow: 0 0.1em 0 #000; }
.btn.primary { background: #ffd60a; color: #1a1300; }
.btn.ghost { background: #141a46; color: #fff; border-color: #2c3580; box-shadow: none; }

h2 { font-family: Impact, "Arial Black", sans-serif; font-size: 2em; color: #22e3ff; }
.comic { font-size: 2.6em; color: #ffd60a; -webkit-text-stroke: 0.05em #000; paint-order: stroke fill; text-shadow: 0 0.08em 0 #000; }
.comic.red { color: #ff3b4a; }
.info { color: #ffd60a; font-weight: bold; }

.board { list-style: none; counter-reset: pos; width: 100%; max-width: 20em; text-align: left; }
.board li { counter-increment: pos; display: flex; justify-content: space-between; padding: 0.4em 0.6em; border-bottom: 1px solid #222a66; }
.board li::before { content: counter(pos) "."; width: 2em; color: #8890c0; }
.board li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li b { color: #ffd60a; }
.board li.empty { justify-content: center; color: #8890c0; }
.board li.empty::before { content: none; }

.wa {
  position: absolute; left: 50%; bottom: 1.2em; transform: translateX(-50%); white-space: nowrap;
  background: #25d366; color: #04210f; font-weight: bold; text-decoration: none; padding: 0.7em 1.2em;
  border-radius: 2em; border: 0.12em solid #000; box-shadow: 0 0.2em 0 #000; font-size: 0.95em;
}

.modal { background: rgba(0, 0, 0, 0.72); z-index: 5; padding: 1.5em; }
.modal .card { background: #0d1236; border: 0.15em solid #22e3ff; border-radius: 1em; padding: 1.6em 1.4em; display: flex; flex-direction: column; gap: 1.2em; align-items: center; max-width: 22em; font-size: 1.1em; line-height: 1.4; box-shadow: 0 0 2em rgba(34, 227, 255, 0.3); }
