/* Shared base styles for the Hrátky portal and all games. The UI font (Nunito, full Czech
   diacritics) is embedded offline in shared/fonts.css, generated by scripts/build.mjs. */
:root {
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  --ink: #2b2350;
  --ink-soft: #5b5486;
  --paper: #fffaf0;
  --sky-1: #8fd3ff;
  --sky-2: #c9f0ff;
  --sun: #ffd23f;
  --orange: #ff8c42;
  --pink: #ff5d8f;
  --green: #4cd37b;
  --blue: #3f8cff;
  --purple: #8f6bff;
  --shadow: 0 6px 0 rgba(43, 35, 80, 0.18), 0 12px 24px rgba(43, 35, 80, 0.18);
  --radius: 28px;
  --tap: 72px; /* minimum big-button size */
  /* Safe areas (iPhone notch / Dynamic Island / home indicator). Use these instead of
     env() directly: shared/device.js applySafeAreaDebug() can override them (?safe=t,r,b,l)
     so headless Chromium (no env() emulation) can test notch layouts. */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; /* no font inflation in iOS landscape */
  text-size-adjust: 100%;
  touch-action: manipulation;     /* no double-tap zoom (iOS 13+) */
}
html, body { margin: 0; height: 100%; }
img { -webkit-user-drag: none; }
body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Big chunky button. Use with an icon from shared/icons.js (+ optional short label). */
.btn {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
  background: #fff;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}
/* hover lift only with a real mouse: on iPhone/iPad a tapped button would keep the "hover" (sticky) */
@media (hover: hover) { .btn:hover { transform: translateY(-2px) scale(1.03); } }
.btn:active { transform: translateY(3px) scale(0.97); box-shadow: 0 2px 0 rgba(43, 35, 80, 0.2); }
.btn:focus-visible { outline: 5px solid var(--sun); outline-offset: 3px; }
.btn.round { padding: 0; width: var(--tap); height: var(--tap); }
.btn.primary { background: var(--green); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.btn.big { font-size: 44px; min-height: 104px; min-width: 104px; padding: 12px 40px; }
.btn .emoji { font-size: 1.15em; line-height: 1; }

/* Icons (shared/icons.js – Material Design Icons as inline SVG, Apache-2.0).
   1em square, fill = currentColor; .soft adds a thin round-joined outline (softer corners). */
.ic { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; fill: currentColor; vertical-align: -0.14em; overflow: visible; pointer-events: none; }
.ic.soft path { stroke: currentColor; stroke-width: 1.1px; stroke-linejoin: round; stroke-linecap: round; paint-order: stroke; }
/* round icon buttons: the icon fills ~62 % of the button */
.btn.round > .ic { width: 62%; height: 62%; }
.ic-star { color: #ffc21a; }
.ic-star.soft path { stroke: #f09400; stroke-width: 1.6px; }

@keyframes hr-bounce-in {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes hr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
