@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #3a2418;
  --cream: #fffaf3;
  --moss: #2f6b4f;
  --moss-dark: #1e4634;
  --amber: #f2c14e;
  --fox: #c4521a;
  font-family: Nunito, ui-rounded, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
}

body {
  min-height: 100dvh;
}

button, a { font: inherit; }

button { cursor: pointer; }

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

#wiese {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding:
    max(14px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.banner {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 8px;
  border-radius: 26px;
  background: linear-gradient(#d7a36e, #8b5a34);
  box-shadow: 0 7px 0 #6b4030, 0 14px 28px rgba(58, 36, 24, 0.16);
}

.ad-slot {
  height: clamp(96px, 16vh, 150px);
  border-radius: 18px;
  overflow: hidden;
  background: #fff6ea center / cover no-repeat;
}

.ad-slot:empty {
  background-image: url("../banner.svg");
}

.ad-slot > * {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}

.head {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--fox);
  text-shadow: 0 2px 0 rgba(255, 250, 243, 0.65);
}

.intro p {
  margin: 6px 0 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 800;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.langs button {
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.92);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 rgba(90, 60, 40, 0.18);
}

.langs button[aria-pressed="true"] {
  background: var(--moss);
  color: var(--cream);
  box-shadow: 0 4px 0 var(--moss-dark);
}

.menu-wrap { position: relative; z-index: 5; }

.menu-btn {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 6px 0 #c4b09a;
  display: grid;
  place-items: center;
}

.menu-btn svg { width: 32px; height: 32px; }

.menu-btn:active, .langs button:active, .go:active, .menu-action:active, .game:active {
  transform: translateY(3px);
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: min(300px, 78vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: var(--cream);
  box-shadow: 0 16px 40px rgba(58, 36, 24, 0.22);
}

.menu[hidden] { display: none; }

.menu-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--fox);
}

.menu-langs button { flex: 1; }

.menu-action, .go {
  min-height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--moss);
  color: var(--cream);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 5px 0 var(--moss-dark);
}

.menu-action.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.games {
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.game {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 14px;
  border: none;
  border-radius: 28px;
  background: rgba(255, 250, 243, 0.94);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 0 #c4b09a;
}

.art { position: relative; display: block; }

.art svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.game strong {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  padding: 6px 6px 0;
}

.game em {
  font-style: normal;
  font-weight: 700;
  color: #6b4634;
  padding: 0 6px 4px;
  font-size: 1.05rem;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 1rem;
}

.badge.play { background: var(--moss); color: var(--cream); }
.badge.wait { background: var(--amber); color: var(--ink); }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 4;
  border: none;
  background: rgba(58, 36, 24, 0.2);
}

.backdrop[hidden] { display: none; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(58, 36, 24, 0.28);
}

.sheet[hidden] { display: none; }

.paper {
  width: min(480px, 100%);
  padding: 22px 22px 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.8), transparent 40%),
    linear-gradient(#fffaf3, #f3e6d4);
  box-shadow: 0 10px 0 #e7d3b0;
}

.paper h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--fox);
}

.paper p {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .games { grid-template-columns: 1fr; }
  .menu-btn { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
