html, body {
  height: 100%;
  margin: 0;
}

body {
  background: #000;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  font-size: 16px;
}

#viewportWrap {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#scaleContainer {
  transform-origin: 50% 50%;
  display: inline-block;
  visibility: hidden;
}

#scaleContainer.is-ready {
  visibility: visible;
}

.mode-shell {
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mode-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-title {
  color: #9fac8f;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
}

.retro-btn {
  background: #9fac8f;
  border: 3px solid #555;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  box-shadow: 3px 3px 0 #000;
  padding: 8px 16px;
  color: #111;
  text-decoration: none;
  font-size: 16px;
}

.retro-btn:active {
  box-shadow: 0 0 0 #000;
  transform: translate(3px, 3px);
}

.retro-btn.small {
  padding: 4px 12px;
  font-size: 14px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.menu-card {
  background: #9fac8f;
  border: 8px solid #555;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.2);
  width: 360px;
  min-height: 260px;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-card h2 {
  margin: 0;
  font-size: 24px;
  color: #1a2813;
}

.menu-card p {
  margin: 0;
  font-size: 15px;
  color: #263a20;
  line-height: 1.4;
}

.menu-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.retro-board {
  background-color: #9fac8f;
  border: 8px solid #555;
  border-radius: 4px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.2);
  padding: 10px;
  box-sizing: border-box;
}

.solo-layout {
  display: grid;
  grid-template-columns: 300px 190px;
  gap: 12px;
  align-items: stretch;
}

.local-layout {
  display: grid;
  grid-template-columns: 88px 400px 88px;
  gap: 10px;
  align-items: center;
}

.canvas-wrap {
  border: 2px solid #444;
  background: #111;
}

.solo-panel,
.local-side {
  background: rgba(0, 0, 0, 0.08);
  border: 2px solid #555;
  padding: 8px;
  box-sizing: border-box;
}

.solo-panel {
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.local-side {
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.panel-title {
  margin: 0;
  font-size: 14px;
  color: #20301a;
  font-weight: bold;
  text-align: center;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  color: #1b2b15;
  font-weight: bold;
}

.stat-list span {
  color: #13210d;
}

.next-canvas {
  width: 80px;
  height: 80px;
  border: 2px solid #444;
  background: #0f0f0f;
}

.mode-status {
  color: #9fac8f;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
}

.mode-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-btn-slot {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.key-hint {
  color: #8fa083;
  font-size: 14px;
}

.bottom-stats {
  background: #9fac8f;
  border: 4px solid #555;
  width: 100%;
  max-width: 612px;
  display: flex;
  justify-content: space-around;
  padding: 10px;
  box-sizing: border-box;
  font-weight: bold;
  color: #13210d;
}

.bottom-stats .stat-item {
  font-size: 15px;
}
