:root {
  color-scheme: light;
  --bg: #fff4e6;
  --ink: #3a2a1f;
  --accent: #ff8a5b;
  --accent-2: #f5d061;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-top:    env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left:   env(safe-area-inset-left, 0px);
  padding-right:  env(safe-area-inset-right, 0px);
}
canvas { display: block; }

#rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, #ffe7c2 0, transparent 50%),
    radial-gradient(circle at 70% 75%, #ffd6c2 0, transparent 50%),
    var(--bg);
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  padding-top:    env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left:   env(safe-area-inset-left, 0px);
  padding-right:  env(safe-area-inset-right, 0px);
}
.rotate-card {
  max-width: 22rem;
  padding: 2rem;
}
.rotate-card h1 {
  margin: 1rem 0 .25rem;
  color: var(--ink);
  font-size: 1.5rem;
}
.rotate-card p {
  margin: 0;
  color: #7b6a5b;
}
.phone {
  width: 80px;
  height: 140px;
  margin: 0 auto;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  position: relative;
  animation: rotate-phone 2.4s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.phone-screen {
  position: absolute;
  inset: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
}
@keyframes rotate-phone {
  0%, 30%   { transform: rotate(0deg); }
  50%, 80%  { transform: rotate(-90deg); }
  100%      { transform: rotate(0deg); }
}

@media (orientation: portrait) and (max-width: 820px) {
  #rotate-hint { display: flex; }
  #game        { display: none; }
}
