.tiny-fun-page {
  --bg-deep: #05080f;
  --bg-card: #0a0f1e;
  --bg-panel: #0f172a;
  --bg-cell: #1e293b;
  --border: #1e3a5f;
  --border-active: #3b82f6;
  --text-primary: #e0f2fe;
  --text-muted: #8ea4c1;
  --text-dim: #47607f;
  --accent-blue: #3b82f6;
  --accent-green: #4ade80;
  --accent-red: #f87171;
  --accent-yellow: #facc15;
  --accent-purple: #c084fc;
}

.tiny-fun-page .font-arcade,
.tiny-fun-page h1,
.tiny-fun-page h2,
.tiny-fun-page h3,
.tiny-fun-page h4 {
  font-family: "Orbitron", sans-serif;
}

.tiny-fun-page strong,
.tiny-fun-page code,
.tiny-fun-page kbd,
.tiny-fun-page .mono,
.tiny-fun-page .score-font {
  font-family: "Share Tech Mono", monospace;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@keyframes flip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes explode {
  0% { transform: scale(1); }
  40% { transform: scale(2.2); filter: brightness(3); }
  100% { transform: scale(1); }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(59, 130, 246, 0.1); }
  50% { box-shadow: 0 0 28px rgba(59, 130, 246, 0.35); }
}

.tiny-fun-shell {
  color: var(--text-primary);
}

.tiny-fun-hero,
.tiny-fun-panel,
.tiny-fun-sidecard,
.tiny-fun-card,
.tiny-fun-feature,
.tiny-fun-inline-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background:
    linear-gradient(160deg, rgba(7, 12, 23, 0.96), rgba(9, 15, 31, 0.86)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 42%);
  border-radius: 1.7rem;
  box-shadow:
    0 28px 64px -34px rgba(4, 9, 19, 0.94),
    inset 0 1px 0 rgba(224, 242, 254, 0.05);
}

.tiny-fun-hero::before,
.tiny-fun-panel::before,
.tiny-fun-card::before,
.tiny-fun-feature::before,
.tiny-fun-sidecard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 6px
    );
  opacity: 0.4;
}

.tiny-fun-hero {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 24rem);
  align-items: start;
}

.tiny-fun-hero-solo {
  grid-template-columns: minmax(0, 1fr);
}

.tiny-fun-hero-game {
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 21rem);
}

.tiny-fun-hero-copy,
.tiny-fun-sidecard,
.tiny-fun-panel,
.tiny-fun-card,
.tiny-fun-feature,
.tiny-fun-inline-card {
  animation: slideUp 320ms ease;
}

.tiny-fun-kicker,
.tiny-fun-section-label,
.tiny-fun-card-badge,
.tiny-fun-chip,
.tiny-fun-reset-note {
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tiny-fun-kicker,
.tiny-fun-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  color: #8ab8ff;
}

.tiny-fun-hero h1 {
  margin: 0.8rem 0 0;
  font-size: clamp(2.2rem, 3.8vw, 4.3rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.tiny-fun-lead,
.tiny-fun-muted,
.tiny-fun-card p,
.tiny-fun-sidecopy,
.tiny-fun-inline-card span,
.tiny-fun-feature li {
  color: var(--text-muted);
}

.tiny-fun-lead {
  max-width: 64ch;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.9;
}

.tiny-fun-chip-row,
.tiny-fun-card-meta,
.tiny-fun-card-actions,
.tiny-fun-stat-grid,
.tiny-fun-feature-top,
.tiny-fun-side-list,
.tiny-fun-link-stack,
.tiny-fun-bullet-list,
.tiny-fun-panel-head,
.fun-header-actions,
.fun-mobile-actions,
.fun-difficulty,
.fun-stat-grid,
.fun-footer-actions,
.fun-keyboard,
.fun-control-pad,
.fun-pad-row,
.fun-inline-stats,
.fun-modal-actions,
.fun-number-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tiny-fun-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.74rem;
  color: #d6f0ff;
  background: rgba(14, 27, 54, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow: inset 0 0 14px rgba(59, 130, 246, 0.08);
}

.tiny-fun-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tiny-fun-sidecard {
  padding: 1.4rem;
}

.tiny-fun-stat {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(13, 21, 40, 0.86);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.tiny-fun-stat-label,
.tiny-fun-side-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tiny-fun-stat strong,
.tiny-fun-side-list strong {
  display: block;
  font-size: 1.05rem;
  color: #effbff;
}

.tiny-fun-sidecopy {
  margin: 1rem 0 0;
  line-height: 1.8;
}

.tiny-fun-panel {
  padding: 1.5rem;
}

.tiny-fun-game-panel {
  padding: 1.8rem;
}

.fun-game-open {
  overflow: hidden;
}

.fun-launcher-card {
  display: grid;
  gap: 1.2rem;
  min-height: 28rem;
  align-content: start;
}

.fun-launcher-copy h2,
.fun-game-start-card h3 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
}

.fun-launcher-copy p,
.fun-game-start-card p {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  line-height: 1.85;
}

.fun-launcher-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fun-launcher-panel,
.fun-game-start-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 14, 25, 0.96), rgba(10, 17, 31, 0.88)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 42%);
}

.fun-launcher-panel h3 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.fun-launcher-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.fun-launcher-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.fun-launcher-meta {
  margin-top: 1rem;
  color: var(--text-muted);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.7;
}

.tiny-fun-panel-head {
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.tiny-fun-panel h2,
.tiny-fun-card h3,
.tiny-fun-feature strong,
.tiny-fun-inline-card strong {
  margin: 0.25rem 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.tiny-fun-card-grid,
.tiny-fun-feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tiny-fun-card {
  padding: 1.3rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tiny-fun-card:hover,
.tiny-fun-inline-card:hover,
.tiny-fun-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 0.34);
  box-shadow:
    0 22px 56px -32px rgba(74, 222, 128, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tiny-fun-card-top,
.tiny-fun-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tiny-fun-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 1rem;
  color: #dbf7ff;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(7, 16, 34, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.tiny-fun-card-badge {
  font-size: 0.72rem;
  color: #a7c7ff;
}

.tiny-fun-card p,
.tiny-fun-inline-card span,
.tiny-fun-feature li,
.tiny-fun-bullet-list li {
  line-height: 1.72;
}

.tiny-fun-card-meta {
  font-size: 0.82rem;
  color: #9dc7f7;
}

.tiny-fun-card-actions {
  align-items: center;
  justify-content: space-between;
  margin-top: 1.1rem;
}

.tiny-fun-primary-link,
.tiny-fun-secondary-link,
.tiny-fun-backlink,
.fun-button,
.fun-chip-button,
.fun-key,
.fun-control-btn,
.fun-number-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.2), rgba(10, 15, 30, 0.94));
  box-shadow: inset 0 0 16px rgba(59, 130, 246, 0.1);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  cursor: pointer;
}

.tiny-fun-primary-link,
.tiny-fun-secondary-link,
.tiny-fun-backlink {
  padding: 0.82rem 1.05rem;
  font-weight: 700;
}

.tiny-fun-secondary-link,
.tiny-fun-backlink {
  background: rgba(12, 18, 34, 0.92);
}

.tiny-fun-primary-link:hover,
.tiny-fun-secondary-link:hover,
.tiny-fun-backlink:hover,
.fun-button:hover,
.fun-chip-button:hover,
.fun-key:hover,
.fun-control-btn:hover,
.fun-number-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.22), rgba(9, 14, 27, 0.94));
}

.tiny-fun-reset-note {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.tiny-fun-split {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
}

.tiny-fun-game-layout {
  display: grid;
  gap: 1.1rem;
  align-items: start;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 22rem);
}

.fun-main-grid,
.fun-bottom-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.fun-main-grid {
  grid-template-columns: minmax(0, 1fr);
}

.fun-bottom-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 22rem);
}

.tiny-fun-link-stack {
  flex-direction: column;
}

.tiny-fun-inline-card {
  padding: 1rem 1.05rem;
  text-decoration: none;
}

.tiny-fun-feature {
  padding: 1.2rem;
}

.tiny-fun-feature ul,
.tiny-fun-bullet-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.tiny-fun-bullet-list.compact {
  margin-top: 0;
}

.tiny-fun-side-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fun-app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fun-app-fullscreen {
  gap: 1.25rem;
}

.fun-app-fullscreen .fun-header {
  justify-content: flex-end;
  padding-bottom: 0.8rem;
}

.fun-app-fullscreen .fun-header-title {
  display: none;
}

.fun-app-fullscreen .fun-header-actions {
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.fun-app-fullscreen .fun-live-score {
  min-width: 10.5rem;
}

.fun-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16);
}

.fun-header-title h2 {
  margin: 0;
  font-size: 1.7rem;
}

.fun-header-title p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.fun-live-score {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(10, 16, 30, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.fun-live-score label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fun-live-score strong {
  display: block;
  font-size: 1.45rem;
  color: #f4fdff;
}

.fun-button,
.fun-chip-button,
.fun-control-btn,
.fun-number-btn {
  padding: 0.78rem 0.95rem;
  font-family: "Share Tech Mono", monospace;
}

.fun-button.primary {
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.22), rgba(10, 18, 28, 0.96));
}

.fun-button.danger {
  border-color: rgba(248, 113, 113, 0.34);
}

.fun-button.subtle,
.fun-chip-button {
  background: rgba(11, 18, 31, 0.95);
}

.fun-chip-button.is-active,
.fun-difficulty-btn.is-active,
.fun-key.is-active {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.22),
    0 0 24px rgba(59, 130, 246, 0.22);
}

.fun-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fun-stat-box {
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(10, 16, 28, 0.9);
  min-height: 5.6rem;
}

.fun-stat-box label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fun-stat-box strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 1.55rem;
  line-height: 1;
}

.fun-stat-box.blue strong { color: #93c5fd; }
.fun-stat-box.green strong { color: #86efac; }
.fun-stat-box.red strong { color: #fca5a5; }
.fun-stat-box.yellow strong { color: #fde68a; }
.fun-stat-box.purple strong { color: #d8b4fe; }

.fun-difficulty {
  align-items: center;
}

.fun-difficulty-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fun-difficulty-btn {
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(10, 16, 30, 0.94);
  color: var(--text-primary);
  cursor: pointer;
  font-family: "Share Tech Mono", monospace;
}

.fun-stage-card,
.fun-sidebar-card {
  border-radius: 1.35rem;
  border: 1px solid rgba(59, 130, 246, 0.14);
  background: rgba(6, 11, 21, 0.88);
  padding: 1.1rem;
}

.fun-stage-card {
  overflow: hidden;
  padding: 1.35rem;
}

.fun-leaderboard-card,
.fun-notes-card {
  min-height: 100%;
}

.fun-canvas-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background:
    linear-gradient(180deg, rgba(9, 15, 27, 1), rgba(4, 8, 15, 1)),
    radial-gradient(circle at top center, rgba(59, 130, 246, 0.12), transparent 55%);
}

.fun-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  animation: scanline 8s linear infinite;
  opacity: 0.26;
}

.fun-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.fun-mobile-actions,
.fun-control-pad,
.fun-footer-actions {
  justify-content: center;
}

.fun-control-pad {
  flex-direction: column;
  align-items: center;
}

.fun-pad-row {
  justify-content: center;
}

.fun-control-btn {
  min-width: 4rem;
  min-height: 3.4rem;
  font-size: 1rem;
}

.fun-message {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(7, 12, 23, 0.92);
  color: var(--text-primary);
}

.fun-message.success { border-color: rgba(74, 222, 128, 0.34); color: #b4f8ce; }
.fun-message.error { border-color: rgba(248, 113, 113, 0.34); color: #ffc0c0; }
.fun-message.warn { border-color: rgba(250, 204, 21, 0.28); color: #fee68c; }

.fun-board,
.fun-grid-board,
.wordle-board,
.mine-board,
.sudoku-board,
.tetris-board {
  display: grid;
  gap: 0.38rem;
}

.wordle-board {
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

.wordle-cell {
  width: clamp(3.35rem, 7vw, 4.6rem);
  height: clamp(3.35rem, 7vw, 4.6rem);
  border-radius: 0.9rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordle-cell.filled { border-color: rgba(147, 197, 253, 0.5); }
.wordle-cell.active { animation: pop 180ms ease; }
.wordle-cell.correct { background: rgba(74, 222, 128, 0.2); border-color: rgba(74, 222, 128, 0.6); color: #dcfce7; }
.wordle-cell.present { background: rgba(250, 204, 21, 0.2); border-color: rgba(250, 204, 21, 0.5); color: #fef08a; }
.wordle-cell.absent { background: rgba(30, 41, 59, 0.95); border-color: rgba(71, 85, 105, 0.44); color: #94a3b8; }
.wordle-cell.flip { animation: flip 420ms ease; }

.fun-keyboard {
  justify-content: center;
}

.fun-key {
  min-width: 2.7rem;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  font-family: "Share Tech Mono", monospace;
}

.fun-key.wide { min-width: 5.8rem; }
.fun-key.correct { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.2); }
.fun-key.present { border-color: rgba(250, 204, 21, 0.5); background: rgba(250, 204, 21, 0.2); }
.fun-key.absent { border-color: rgba(71, 85, 105, 0.4); background: rgba(30, 41, 59, 0.92); }

.typing-passage {
  min-height: 13rem;
  padding: 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(7, 12, 23, 0.92);
  font-size: 1.05rem;
  line-height: 2;
  white-space: normal;
  overflow-x: hidden;
  overflow-y: auto;
  word-break: normal;
  overflow-wrap: break-word;
}

.typing-char {
  position: relative;
  font-family: "Share Tech Mono", monospace;
  color: var(--text-dim);
}

.typing-char.correct { color: #93c5fd; }
.typing-char.wrong { color: #fca5a5; }
.typing-char.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18rem;
  height: 0.12rem;
  background: #93c5fd;
  animation: blink 1s linear infinite;
}

.fun-hidden-input {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mine-board {
  justify-content: center;
}

.mine-row {
  display: flex;
  gap: 0.28rem;
}

.mine-cell,
.tetris-cell,
.sudoku-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.14);
  color: #dff7ff;
  user-select: none;
}

.mine-cell {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.52rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.96rem;
}

.mine-cell.revealed { background: rgba(30, 41, 59, 0.8); }
.mine-cell.safe { box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.14); }
.mine-cell.flagged { color: #fef08a; }
.mine-cell.mine { animation: explode 320ms ease; color: #ffc8c8; }

.fun-number-1 { color: #93c5fd; }
.fun-number-2 { color: #86efac; }
.fun-number-3 { color: #fca5a5; }
.fun-number-4 { color: #d8b4fe; }
.fun-number-5 { color: #fb7185; }
.fun-number-6 { color: #67e8f9; }
.fun-number-7 { color: #cbd5e1; }
.fun-number-8 { color: #facc15; }

.tetris-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 12rem;
}

.tetris-board {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  background: rgba(4, 8, 15, 0.94);
  padding: 0.4rem;
  border-radius: 1rem;
}

.tetris-cell {
  aspect-ratio: 1 / 1;
  border-radius: 0.28rem;
  min-width: 1.5rem;
}

.tetris-cell.empty { background: rgba(15, 23, 42, 0.5); }
.tetris-cell.ghost { opacity: 0.28; }
.tetris-cell.flash { animation: pulse 240ms linear 2; }

.tetris-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tetris-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.22rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: rgba(4, 8, 15, 0.94);
}

.tetris-mini-cell {
  aspect-ratio: 1 / 1;
  border-radius: 0.26rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.fun-inline-stats {
  align-items: center;
  color: var(--text-muted);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.92rem;
}

.sudoku-board {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 42rem);
  max-width: 42rem;
  margin-inline: auto;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 1rem;
  overflow: hidden;
}

.sudoku-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  font-family: "Share Tech Mono", monospace;
  font-size: 1.15rem;
  background: rgba(7, 12, 23, 0.96);
  cursor: pointer;
}

.sudoku-cell.given {
  background: rgba(17, 24, 39, 0.98);
  font-weight: 700;
}

.sudoku-cell.selected { box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.75); }
.sudoku-cell.related { background: rgba(30, 41, 59, 0.92); }
.sudoku-cell.same { color: #93c5fd; }
.sudoku-cell.error { color: #fca5a5; animation: shake 240ms ease; }

.sudoku-cell[data-col="2"],
.sudoku-cell[data-col="5"] {
  border-right-width: 2px;
}

.sudoku-cell[data-row="2"],
.sudoku-cell[data-row="5"] {
  border-bottom-width: 2px;
}

.sudoku-notes {
  position: absolute;
  inset: 0.12rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  font-size: 0.44rem;
  color: #9cc0ff;
}

.fun-sudoku-stage {
  width: min(100%, 44rem);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.fun-number-pad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.fun-sudoku-stage .fun-number-pad {
  width: 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fun-number-btn {
  min-height: 3.2rem;
  font-size: 1rem;
}

.fun-number-btn.active {
  border-color: rgba(74, 222, 128, 0.48);
  box-shadow: 0 0 22px rgba(74, 222, 128, 0.18);
}

.fun-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(12px);
}

.fun-overlay-game {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 38%),
    rgba(3, 6, 12, 0.92);
  backdrop-filter: blur(18px);
}

.fun-game-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(5, 9, 18, 0.98), rgba(7, 12, 23, 0.96)),
    radial-gradient(circle at top center, rgba(59, 130, 246, 0.12), transparent 55%);
}

.fun-game-shell-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.14);
  background: rgba(4, 9, 18, 0.82);
}

.fun-game-shell-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.fun-game-shell-head p {
  margin: 0.35rem 0 0;
}

.fun-game-shell-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1rem 1.3rem;
}

.fun-game-start-screen {
  min-height: calc(100dvh - 8rem);
  display: grid;
  place-items: center;
}

.fun-game-start-card {
  width: min(52rem, 100%);
  padding: 1.6rem;
  box-shadow: 0 28px 64px -34px rgba(4, 9, 19, 0.94);
}

.fun-game-runtime-host {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.fun-modal {
  width: min(42rem, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 1.4rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(180deg, rgba(6, 11, 21, 0.98), rgba(10, 17, 31, 0.96));
  box-shadow: 0 32px 70px -36px rgba(4, 9, 19, 1);
  padding: 1.3rem;
}

.fun-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.fun-modal-head h3 {
  margin: 0;
  font-size: 1.4rem;
}

.fun-modal-head p {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
}

.fun-leaderboard-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fun-leaderboard-row,
.fun-preview-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) minmax(8rem, auto);
  align-items: center;
  gap: 0.85rem;
  padding: 0.78rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.12);
  background: rgba(10, 16, 28, 0.94);
}

.fun-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  background: rgba(59, 130, 246, 0.15);
}

.fun-medal.gold { background: rgba(250, 204, 21, 0.2); }
.fun-medal.silver { background: rgba(226, 232, 240, 0.18); }
.fun-medal.bronze { background: rgba(251, 146, 60, 0.18); }

.fun-leaderboard-meta,
.fun-preview-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: none;
}

.fun-game-shell-score {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.fun-game-shell-score-label {
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fun-game-shell-score-value {
  color: var(--text-primary);
  font-family: "Share Tech Mono", monospace;
  font-size: 1.1rem;
  line-height: 1;
}

.fun-input,
.fun-select {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(7, 12, 23, 0.92);
  color: var(--text-primary);
  padding: 0.92rem 1rem;
}

.fun-input:focus,
.fun-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.56);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.fun-modal-actions {
  justify-content: flex-end;
  margin-top: 1rem;
}

.fun-inline-restart {
  margin-top: 0.85rem;
}

.fun-inline-restart .fun-button {
  width: 100%;
}

.fun-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 95;
  max-width: 22rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(8, 13, 24, 0.96);
  color: var(--text-primary);
  box-shadow: 0 20px 56px -30px rgba(4, 9, 19, 1);
}

.fun-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fun-sidebar-card h3,
.fun-stage-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.fun-reset-note-inline {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: none;
}

.fun-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fun-help-copy {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.fun-runtime {
  height: 100%;
}

.fun-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  height: 100%;
  overflow: hidden;
}

.fun-game-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  background: #05080f;
  border-right: 1px solid rgba(59, 130, 246, 0.16);
}

.fun-stage-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fun-stage-shell > * {
  max-width: 100%;
  max-height: 100%;
}

.fun-stage-shell > [data-stage] {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fun-stage-shell > [data-stage] > * {
  max-width: 100%;
  max-height: 100%;
}

.fun-stage-shell > [data-stage] > div[style*="overflow:auto"] {
  max-width: 100%;
  max-height: 100%;
}

.fun-controls-pane {
  width: auto;
  min-width: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem;
  overflow-y: auto;
  background: #0a0f1e;
  scrollbar-width: thin;
}

.fun-control-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(10, 16, 28, 0.94);
  min-width: 0;
  padding: 0.75rem;
}

.fun-control-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.25;
}

.fun-control-card-score label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fun-control-card-score strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.65rem;
  line-height: 1;
  color: #f4fdff;
}

.fun-control-card-score .fun-control-card-head {
  align-items: center;
  margin-bottom: 0.4rem;
}

.fun-control-card-score .fun-button {
  white-space: nowrap;
}

.fun-control-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.fun-control-card-head h3 {
  margin: 0;
}

.fun-action-card .fun-button {
  width: 100%;
}

.fun-controls-pane .fun-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.fun-controls-pane .fun-stat-box {
  min-height: 0;
  padding: 0.8rem 0.85rem;
}

.fun-controls-pane .fun-stat-box strong {
  font-size: 1.25rem;
}

.fun-controls-pane .fun-stat-box label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.fun-controls-pane .fun-difficulty {
  gap: 0.5rem;
}

.fun-controls-pane .fun-footer-actions,
.fun-controls-pane .fun-mobile-actions,
.fun-controls-pane .fun-keyboard {
  justify-content: flex-start;
}

.fun-controls-pane .fun-footer-actions,
.fun-controls-pane .fun-mobile-actions {
  gap: 0.6rem;
}

.fun-controls-pane .fun-keyboard {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fun-controls-pane .fun-keyboard-row {
  display: grid;
  gap: 0.4rem;
}

.fun-controls-pane .fun-key {
  min-width: 0;
  min-height: 2.45rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  font-size: 0.74rem;
}

.fun-controls-pane .fun-key.wide {
  min-width: 4.3rem;
}

.fun-controls-pane .fun-number-pad {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.fun-controls-pane .fun-number-btn {
  min-height: 2.85rem;
}

.fun-typing-stage {
  width: min(100%, 54rem);
  display: grid;
  gap: 1rem;
  align-items: center;
}

.typing-passage {
  width: min(100%, 54rem);
  max-width: 100%;
  max-height: min(100%, 32rem);
  overflow: auto;
}

.wordle-board {
  width: min(100%, calc((90vh - 240px) * 5 / 6), 24rem);
  aspect-ratio: 5 / 6;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.wordle-row {
  gap: 0.45rem;
}

.wordle-cell {
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
  font-size: clamp(1rem, 2vmin, 1.45rem);
}

.sudoku-board {
  width: min(100%, calc(90vh - 200px), 34rem);
  max-width: 34rem;
  aspect-ratio: 1 / 1;
}

.tetris-board.fun-tetris-stage {
  width: min(100%, calc((90vh - 180px) * 0.5), 18rem);
  max-width: 18rem;
  aspect-ratio: 10 / 20;
}

.tetris-preview-wrap {
  gap: 0.85rem;
}

.fun-legend-list,
.fun-control-legend {
  display: grid;
  gap: 0.6rem;
}

.fun-legend-list div,
.fun-control-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.fun-legend-list span,
.fun-control-legend span {
  color: var(--text-muted);
  text-align: right;
}

.fun-canvas-wrap.square {
  width: min(100%, calc(94vh - 210px), 34rem);
  aspect-ratio: 1 / 1;
}

.fun-canvas-wrap.portrait {
  width: min(100%, 22rem);
  height: min(100%, calc(94vh - 190px));
  aspect-ratio: 360 / 580;
}

.fun-canvas-wrap.landscape {
  width: min(100%, 100%);
  max-width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(100%, calc(94vh - 220px));
}

.fun-canvas {
  width: 100%;
  height: 100%;
}

.fun-overlay-game {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.fun-game-shell {
  width: min(98vw, 1320px);
  height: min(94vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #1e3a5f;
  background: #0a0f1e;
  box-shadow: 0 32px 70px -36px rgba(4, 9, 19, 1);
}

.fun-game-shell-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #1e3a5f;
  flex-shrink: 0;
  background: rgba(7, 12, 23, 0.98);
}

.fun-game-shell-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.fun-game-shell-head [data-close-game] {
  flex: 0 0 auto;
  align-self: flex-start;
  white-space: nowrap;
  padding: 0.65rem 1rem;
}

.fun-game-shell-head h2 {
  margin: 0.3rem 0 0;
  font-size: 1.85rem;
}

.fun-game-shell-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.fun-game-start-screen {
  min-height: 100%;
  padding: 1rem;
  overflow: auto;
}

.fun-game-start-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.fun-game-start-grid {
  width: min(1200px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(21rem, 27rem);
  gap: 1rem;
  align-items: stretch;
}

.fun-game-start-settings {
  justify-content: space-between;
}

.fun-start-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.fun-start-block,
.fun-start-setting,
.fun-setting-empty {
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(8, 14, 25, 0.88);
}

.fun-start-block {
  padding: 1rem;
}

.fun-start-block h4,
.fun-game-start-settings h3 {
  margin: 0;
}

.fun-start-setting {
  padding: 0.95rem;
}

.fun-start-setting + .fun-start-setting {
  margin-top: 0.85rem;
}

.fun-start-setting-head strong {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.98rem;
  color: #effbff;
}

.fun-start-setting-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.fun-setting-options {
  margin-top: 0.75rem;
}

.fun-start-setting-notes {
  margin-top: 0.65rem;
}

.fun-start-note {
  display: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.fun-start-note.is-active {
  display: block;
}

.fun-setting-empty {
  padding: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.fun-start-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fun-runtime-compact .fun-controls-pane {
  gap: 0.7rem;
}

.fun-runtime-compact [data-help-card],
.fun-runtime-compact [data-difficulty-card] {
  display: none !important;
}

.fun-game-runtime-host {
  width: 100%;
  height: 100%;
  display: flex;
  min-height: 0;
}

.fun-game-runtime-host > .fun-runtime {
  width: 100%;
  height: 100%;
}

.fun-button,
.fun-control-btn,
.fun-number-btn {
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

@media (min-width: 901px) {
  .fun-stage-card-wide {
    min-height: 36rem;
  }

  .fun-app-fullscreen .fun-stage-card-wide {
    min-height: min(46rem, calc(100dvh - 20rem));
  }
}

@media (max-width: 1180px) {
  .tiny-fun-hero,
  .tiny-fun-hero-game,
  .tiny-fun-split,
  .tiny-fun-game-layout,
  .fun-main-grid,
  .fun-bottom-grid {
    grid-template-columns: 1fr;
  }

  .fun-launcher-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .fun-stat-grid,
  .tiny-fun-card-grid,
  .tiny-fun-feature-grid {
    grid-template-columns: 1fr;
  }

  .tiny-fun-card[data-game-slug="wordle"],
  .tiny-fun-card[data-game-slug="typing-test"],
  .tiny-fun-card[data-game-slug="sudoku"] {
    display: none;
  }

  .fun-runtime[data-runtime-game="snake"] [data-mobile-card] {
    display: none !important;
  }

  .fun-game-start-grid,
  .fun-start-info-grid {
    grid-template-columns: 1fr;
  }

  .fun-game-start-screen {
    padding-bottom: calc(6.75rem + env(safe-area-inset-bottom));
  }

  .fun-game-start-settings .fun-launcher-actions {
    position: sticky;
    bottom: calc(-0.85rem + env(safe-area-inset-bottom));
    z-index: 8;
    margin-top: auto;
    padding-top: 0.85rem;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(180deg, rgba(10, 15, 30, 0), rgba(10, 15, 30, 0.94) 28%, rgba(10, 15, 30, 0.99));
  }

  .fun-game-start-settings .fun-launcher-actions [data-start-game],
  .fun-game-start-settings .fun-launcher-actions .fun-preview-meta {
    width: 100%;
  }

  .tetris-layout {
    grid-template-columns: 1fr;
  }

  .fun-number-pad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fun-app-fullscreen .fun-header-actions {
    justify-content: flex-start;
  }

  .fun-sudoku-stage .fun-number-pad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fun-game-shell {
    width: min(96vw, 1024px);
    height: min(94vh, 840px);
  }

  .fun-modal-layout {
    display: flex;
    flex-direction: column;
  }

  .fun-game-pane {
    flex: 0 0 50vh;
    min-height: 50vh;
    border-right: 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.16);
  }

  .fun-controls-pane {
    width: 100%;
    min-width: 0;
    flex: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(16rem, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    align-items: start;
  }

  .fun-control-card {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .tiny-fun-hero,
  .tiny-fun-panel,
  .tiny-fun-sidecard {
    padding: 1.15rem;
  }

  .fun-header {
    flex-direction: column;
    align-items: stretch;
  }

  .fun-game-shell-head {
    flex-direction: row;
    align-items: flex-start;
    padding: 0.9rem;
  }

  .fun-game-shell-body {
    padding: 0;
  }

  .fun-game-start-screen {
    min-height: auto;
    padding: 0.85rem 0.85rem calc(6.75rem + env(safe-area-inset-bottom));
  }

  .fun-game-start-card,
  .fun-launcher-panel {
    padding: 1.1rem;
  }

  .fun-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fun-app-fullscreen .fun-header-actions {
    width: 100%;
  }

  .wordle-cell {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }

  .mine-cell {
    width: 1.62rem;
    height: 1.62rem;
    font-size: 0.82rem;
    border-radius: 0.38rem;
  }

  .fun-key {
    min-width: 2.25rem;
    min-height: 2.7rem;
    padding: 0.55rem;
    font-size: 0.82rem;
  }

  .fun-key.wide {
    min-width: 4.4rem;
  }

  .sudoku-cell {
    font-size: 1rem;
  }

  .fun-modal {
    padding: 1rem;
  }

  .fun-sudoku-stage .fun-number-pad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fun-game-shell-head [data-close-game] {
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 599px) {
  .fun-overlay-game {
    padding: 0;
  }

  .fun-game-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .fun-game-pane {
    flex: 0 0 60vh;
    min-height: 60vh;
    padding: 0.75rem;
  }

  .fun-controls-pane {
    flex: 0 0 40vh;
    padding: 0.75rem;
    grid-auto-columns: minmax(18rem, 88vw);
  }

  .fun-game-start-screen {
    padding: 0.75rem 0.75rem calc(6.5rem + env(safe-area-inset-bottom));
  }

  .fun-game-shell-head {
    padding: 0.75rem 0.8rem;
    gap: 0.75rem;
  }

  .fun-game-shell-head h2 {
    font-size: 1.45rem;
  }

  .fun-game-shell-head [data-close-game] {
    padding: 0.5rem 0.7rem;
    font-size: 0.76rem;
  }

  .fun-game-start-card,
  .fun-start-block,
  .fun-start-setting {
    padding: 0.95rem;
  }

  .wordle-board {
    width: min(100%, calc((60vh - 90px) * 5 / 6), 20rem);
  }

  .fun-controls-pane .fun-key {
    min-width: 2rem;
    min-height: 2.3rem;
    font-size: 0.72rem;
  }

  .fun-controls-pane .fun-key.wide {
    min-width: 4rem;
  }
}

.fun-overlay {
  z-index: 10000;
}

.fun-toast {
  z-index: 10001;
}

.fun-stage-shell .mine-board {
  max-width: max-content;
}

.fun-stage-shell .sudoku-board {
  max-width: min(100%, 34rem);
}
