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

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

body {
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding:
    max(8px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 8px;
}

.crumb {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.85rem;
}

h1 {
  margin: 0;
  font-size: clamp(0.95rem, 3.4vw, 1.35rem);
}

.taper { margin-bottom: 8px; }

.top .tip-slot { margin: 0; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.game-btn {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 4px;
  padding: 8px;
  color: var(--ink-bright);
  font: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.game-btn:active { background: #0000aa; }

.game-ico {
  font-size: clamp(1.4rem, calc(var(--cell, 18dvh) * 0.42), 6rem);
  line-height: 1;
}

.game-ico.mascot-ico {
  width: auto;
  height: clamp(2.4rem, calc(var(--cell, 18dvh) * 0.42), 5.5rem);
  object-fit: contain;
  font-size: 0;
}

.game-btn h2 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink-bright);
  font-size: clamp(0.62rem, calc(var(--cell, 12dvh) * 0.11), 1.15rem);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.game-btn.empty {
  cursor: default;
  pointer-events: none;
  background-image: none;
  background-color: transparent;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.game-btn.empty:hover,
.game-btn.empty:active,
.game-btn.empty:focus {
  background: transparent;
  background-color: transparent;
  box-shadow: none;
}

.game-btn.empty::before,
.game-btn.empty::after { display: none; }
