/* layout.css – Hauptraster: Canvas voll, Overlays drueber */

.app {
  position: fixed;
  inset: 0;
  display: block;
  width: 100dvw;
  height: 100dvh;
}

.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #0f1014;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Menue (Login/Register/Character) – Vollbild-Overlay */
.menu {
  position: absolute;
  inset: 0;
  background: rgba(20, 21, 28, 0.96);
  display: grid;
  place-items: center;
  padding: max(16px, var(--safe-top)) max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left));
  z-index: 50;
}

.menu[hidden] { display: none; }

.menu-inner {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-1);
}

.menu-inner h1 {
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: 0.5px;
}

.menu-sub {
  color: var(--text-dim);
  margin: 4px 0 18px;
}

.menu-form { display: grid; gap: 12px; }
.menu-form[hidden] { display: none; }
.menu-form label { display: grid; gap: 6px; font-size: 0.95em; color: var(--text-dim); }
.menu-form .btn { margin-top: 4px; }

.menu-error {
  color: var(--danger);
  margin-top: 12px;
  text-align: center;
}

/* Bottom-Sheets */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(72dvh, 680px);
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  z-index: 40;
  transform: translateY(0);
  transition: transform 220ms ease;
  display: flex;
  flex-direction: column;
  padding-bottom: max(12px, var(--safe-bottom));
}

.sheet[hidden] {
  display: flex;
  transform: translateY(110%);
  pointer-events: none;
}

.sheet-header {
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 { font-size: 1.1em; }

.sheet-close {
  background: transparent;
  border: none;
  font-size: 1.5em;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 18px;
}
