:root {
  color-scheme: dark;
  --ink: #efffe7;
  --night: #06131f;
  --deep: #091b2e;
  --leaf: #1c5b52;
  --mint: #8af0bd;
  --glow: #f8e77a;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

body {
  display: grid;
  place-items: center;
}

#game-shell {
  position: relative;
  width: min(100vw, calc(100vh * 9 / 16), 620px);
  height: min(100vh, calc(100vw * 16 / 9), 1102px);
  min-width: 240px;
  min-height: 426px;
  overflow: hidden;
  background: #081827;
  isolation: isolate;
  box-shadow: 0 0 70px #02070c;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
  outline: none;
}

#game:focus-visible {
  outline: 3px solid #f8e77a;
  outline-offset: -3px;
}

#rotate-card {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  place-content: center;
  justify-items: center;
  gap: .65rem;
  padding: 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 50%, #0f3b3e 0 30%, #06131f 70%);
}

#rotate-card strong {
  color: #f8e77a;
  font-size: clamp(1.2rem, 4vw, 2rem);
}

#rotate-card small {
  color: #b5d8cb;
  font-size: clamp(.85rem, 2.4vw, 1.1rem);
}

.rotate-flower {
  color: #8af0bd;
  font-size: clamp(3rem, 10vw, 5rem);
  filter: drop-shadow(0 0 16px #8af0bd);
  animation: breathe 1.8s ease-in-out infinite;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes breathe {
  50% { transform: scale(1.12) rotate(15deg); opacity: .8; }
}

@media (orientation: landscape) and (max-height: 650px) {
  #game-shell {
    width: min(56.25vh, 620px);
    height: 100vh;
  }

  #rotate-card {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rotate-flower { animation: none; }
}
