* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-width: 100vw;
  max-height: 100dvh;
  background: #1a3a18;
  color: #d8f5d0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  overflow: hidden;
  /* pan-y so title menu can scroll; game canvas still locks gestures */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
/* while playing, kill browser gesture chrome */
body.playing {
  touch-action: none;
}

/* PWA / installed: truly full screen, no browser chrome */
@media all and (display-mode: fullscreen),
       all and (display-mode: standalone) {
  html, body, #app {
    width: 100%;
    height: 100%;
    height: 100dvh;
  }
  #btn-fs { display: none; }
}

/* entire app = the device screen — no letterbox “browser game” frame */
#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-width: none;
  margin: 0;
  display: block;
  background: #1a3a18;
  overflow: hidden;
}
#app:fullscreen,
#app:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #1a3a18;
}

/* canvas paints the whole screen under HUD/controls */
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #1a3a18;
  touch-action: none;
  z-index: 0;
}
/* title / game-over: canvas must NEVER steal taps from START / orient */
body:not(.playing) #game {
  pointer-events: none !important;
}

/* HUD floats over the top of the canvas */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: linear-gradient(to bottom, rgba(5, 14, 8, 0.82) 0%, rgba(5, 14, 8, 0.35) 70%, transparent 100%);
  pointer-events: none;
}

.hp-block {
  flex: 1;
  min-width: 0;
}
.hp-block.right { text-align: right; }
.hp-block .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #7cb86a;
  margin-bottom: 3px;
  font-weight: 700;
}
.hp-block.right .label { text-align: right; }
.bar {
  height: 10px;
  background: #1a2e1a;
  border: 1px solid #2d4a2d;
  border-radius: 2px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: #5dbb2b;
  transition: transform 0.12s linear;
}
.hp-block.right .bar i {
  background: #c45c26;
  transform-origin: right center;
}

#lives {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #e06070;
  font-weight: 800;
  line-height: 1;
}

#score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 96px;
}
#score {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 20px;
  color: #f0d060;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
#mow-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8a9a70;
  text-transform: uppercase;
  white-space: nowrap;
}
#beer-inv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #d0a040;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 1px;
}
#beer-inv.ok { color: #f0d060; }
#beer-inv.tipsy { color: #f0a020; }
#beer-inv.drunk { color: #f04040; animation: pulse 0.5s ease infinite alternate; }
#beer-inv.wrecked {
  color: #ff3030;
  animation: pulse 0.28s ease infinite alternate;
  text-shadow: 0 0 8px rgba(255, 40, 20, 0.7);
}
#beer-inv.grease { color: #ffe080; animation: pulse 0.35s ease infinite alternate; }
#gas-inv {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8a9a70;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 1px;
}
#gas-inv.has { color: #e08040; }
#spray-inv {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #888;
}
#spray-inv.has { color: #e0c020; }
#whiskey-inv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #a08050;
  min-height: 1.1em;
}
#whiskey-inv.has { color: #f0b050; }
#whiskey-inv.hidden { display: none; }
#mulch-inv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8a7050;
  margin-top: 1px;
}
#mulch-inv.has { color: #c8a060; }
#mulch-inv.full { color: #7CFF8A; }
#mulch-inv.hidden { display: none; }

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

#banner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 14px;
  background: rgba(26, 58, 24, 0.88);
  /* above controls/HUD so title taps always hit the menu */
  z-index: 100;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  pointer-events: auto !important;
  /* no CSS transforms that could flip the whole menu */
  transform: none;
}
#banner.hidden { display: none; }

/* title/menu open: hide gamepad so it can't steal taps under the banner */
body:not(.playing) #controls {
  display: none !important;
  pointer-events: none !important;
}
body:not(.playing) #hud {
  opacity: 0.35;
  pointer-events: none !important;
}
/* keep menu buttons on top of any sticky chrome */
#banner button,
#banner .orient-btn,
#banner #orient-pick,
#banner #banner-actions {
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(93, 187, 43, 0.25);
}
#banner-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: #d8f5d0;
  white-space: pre-line;
  max-width: min(420px, 92vw);
  flex-shrink: 1;
}
#banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  /* keep START reachable when content is tall */
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 10px 0 4px;
  background: linear-gradient(to top, rgba(26, 58, 24, 0.98) 60%, rgba(26, 58, 24, 0));
  z-index: 6;
}
#banner-logo {
  width: min(340px, 78vw);
  max-height: min(36vh, 320px);
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 2px;
  image-rendering: auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(90, 140, 50, 0.55);
  background: #1a3a18;
  flex-shrink: 0;
  /* prevent accidental flips from parent transforms */
  transform: none;
}
#banner-text.with-logo {
  font-size: 13px;
  max-width: min(420px, 92vw);
  opacity: 0.95;
}

/* ---- post-game party board (beer · boom · good times) ---- */
#scoreboard {
  width: min(420px, 94vw);
  max-height: min(58vh, 520px);
  overflow-y: auto;
  margin: 4px 0 6px;
  padding: 10px 12px 12px;
  border-radius: 10px;
  background: rgba(12, 28, 12, 0.88);
  border: 2px solid rgba(90, 140, 50, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  flex-shrink: 1;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
#scoreboard.hidden { display: none !important; }
#sb-head {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #8aba70;
  text-align: center;
  margin-bottom: 2px;
}
#sb-sub {
  font-size: 10px;
  font-weight: 700;
  color: #c8a060;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
#sb-time {
  font-size: 12px;
  font-weight: 700;
  color: #f0d060;
  text-align: center;
  margin-bottom: 8px;
}
#sb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-weight: 700;
  color: #d8f5d0;
}
#sb-table th {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #7a9a60;
  font-weight: 800;
  padding: 2px 6px 6px;
  border-bottom: 1px solid rgba(90, 140, 50, 0.35);
  text-align: right;
}
#sb-table th:first-child { text-align: left; }
#sb-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(40, 70, 40, 0.45);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#sb-table td:first-child {
  text-align: left;
  color: #a8c890;
  font-weight: 800;
  letter-spacing: 0.03em;
}
#sb-table tr.record td:nth-child(2) {
  color: #f0d060;
}
#sb-table tr.record td:nth-child(2)::after {
  content: ' ★';
  color: #f0a020;
  font-size: 10px;
}
#sb-table tr.party-stat td:first-child {
  color: #e8c060;
}
#nishals-panel {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(90, 140, 50, 0.4);
  text-align: center;
}
#nishals-sign {
  display: block;
  width: min(220px, 70vw);
  height: auto;
  margin: 0 auto 8px;
  border-radius: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
#nishals-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}
#nishals-input {
  width: 5.2em;
  padding: 10px 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  color: #f0e8c0;
  background: rgba(20, 40, 16, 0.95);
  border: 2px solid #c8a040;
  border-radius: 8px;
  outline: none;
}
#nishals-input:focus {
  border-color: #f0d060;
  box-shadow: 0 0 0 2px rgba(240, 208, 96, 0.25);
}
#btn-nishals {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #1a1008;
  background: linear-gradient(180deg, #f0d060, #c89030);
  border: 2px solid #8a6020;
  border-radius: 8px;
  cursor: pointer;
}
#btn-nishals:disabled {
  opacity: 0.55;
  cursor: default;
}
#nishals-status {
  min-height: 1.2em;
  font-size: 11px;
  font-weight: 700;
  color: #a0c880;
  margin-top: 4px;
}
#nishals-status.err { color: #e08060; }
#nishals-status.ok { color: #7CFF8A; }
#sb-online {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(90, 140, 50, 0.4);
}
#sb-online-head {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #c8a878;
  text-align: center;
  margin-bottom: 6px;
}
#sb-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: #d8f5d0;
  max-height: 140px;
  overflow-y: auto;
}
#sb-online-list li {
  display: grid;
  grid-template-columns: 1.6em 3.2em 1fr auto;
  gap: 6px;
  padding: 3px 2px;
  border-bottom: 1px solid rgba(40, 70, 40, 0.4);
  align-items: baseline;
}
#sb-online-list li .rank { color: #7a9a60; }
#sb-online-list li .who { color: #f0d060; letter-spacing: 0.12em; font-weight: 900; }
#sb-online-list li .bits { color: #a8c890; font-size: 10px; }
#sb-online-list li .pts { color: #e8c060; font-variant-numeric: tabular-nums; }
#sb-online-list li.muted {
  display: block;
  text-align: center;
  color: #6a8a55;
  border: none;
  padding: 8px;
}
#sb-online-list li.you .who { color: #7CFF8A; }
#sb-foot {
  margin-top: 8px;
  font-size: 10px;
  color: #6a8a55;
  text-align: center;
  letter-spacing: 0.04em;
}

/* short / landscape menus: compress so START stays on-screen */
@media (orientation: landscape), (max-height: 520px) {
  #banner {
    justify-content: flex-start;
    gap: 8px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
  #banner-logo {
    max-height: min(22vh, 160px);
    width: auto;
    max-width: min(42vw, 220px);
    margin-bottom: 0;
  }
  #banner-text.with-logo {
    font-size: 11px;
    line-height: 1.35;
    max-height: none;
  }
  #orient-pick {
    margin: 0;
    width: min(480px, 96vw);
  }
  #orient-label {
    margin-bottom: 6px;
    font-size: 11px;
  }
  #orient-btns {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .orient-btn {
    min-height: 56px;
    max-width: none;
    padding: 8px 10px;
  }
  .orient-btn .orient-emoji { font-size: 22px; }
  .orient-btn .orient-name { font-size: 12px; }
  .orient-btn .orient-hint { font-size: 10px; }
  #btn-start, #btn-break-skip {
    min-height: 44px;
    padding: 10px 24px;
    font-size: 14px;
  }
}
#btn-start, #btn-break-skip, #btn-im-done, #btn-orient-switch {
  appearance: none;
  border: 2px solid #5dbb2b;
  background: #1a3a14;
  color: #b8f090;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.14em;
  padding: 14px 28px;
  border-radius: 6px;
  cursor: pointer;
  min-height: 52px;
  min-width: 140px;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}
#btn-start:active, #btn-break-skip:active, #btn-im-done:active, #btn-orient-switch:active { background: #2a5a20; }
#btn-break-skip.secondary, #btn-start.secondary, #btn-orient-switch.secondary {
  border-color: #6a7a50;
  background: #152018;
  color: #a0b890;
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* intermission / wife break — full device overlay for cartoons & video */
#intermission {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(26, 58, 24, 0.92);
}
#intermission.hidden { display: none; }
#im-card {
  width: min(520px, 100%);
  max-height: 100%;
  overflow: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#im-img, #im-video {
  width: min(420px, 92vw);
  max-height: min(42vh, 360px);
  object-fit: contain;
  border-radius: 10px;
  background: #1e4020;
  border: 2px solid #3a5a30;
}
#im-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #f0d060;
  text-transform: uppercase;
}
#im-text {
  font-size: 14px;
  line-height: 1.5;
  color: #c8e0b8;
  white-space: pre-line;
  max-width: 36em;
}
#im-timer {
  font-size: 12px;
  font-weight: 700;
  color: #7cb86a;
  letter-spacing: 0.08em;
}

/* controls overlay bottom of screen — canvas stays full bleed */
#controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  gap: 16px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 14, 8, 0.55) 0%, transparent 100%);
}

#stick-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
#btn-whiskey {
  appearance: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  touch-action: none;
  border: 3px solid #e0a040;
  background: rgba(70, 40, 12, 0.92);
  color: #f5c060;
  flex-shrink: 0;
}
#btn-whiskey:active { background: #8a5020; transform: scale(0.96); }
#btn-whiskey:disabled {
  opacity: 0.4;
  border-color: #555;
  color: #888;
}
#btn-whiskey[hidden] { display: none !important; }
#stick {
  /* 2× diameter for fat thumbs (was 120) */
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(40, 70, 40, 0.5);
  border: 3px solid rgba(58, 90, 48, 0.85);
  position: relative;
  touch-action: none;
  pointer-events: auto;
}
#knob {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #5dbb2b;
  border: 3px solid #8ae050;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  align-items: center;
}
#btn-fire, #btn-gas, #btn-spray {
  appearance: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  touch-action: none;
}
#btn-fire {
  border: 3px solid #d0a040;
  background: rgba(90, 58, 16, 0.9);
  color: #f0d060;
}
#btn-fire:active, #btn-fire.held {
  background: #8a6020;
  transform: scale(0.96);
}
#btn-gas {
  width: 72px;
  height: 72px;
  border: 3px solid #c06030;
  background: rgba(70, 36, 16, 0.9);
  color: #f0a060;
  font-size: 12px;
}
#btn-gas:active { background: #8a4020; transform: scale(0.96); }
#btn-spray {
  width: 68px;
  height: 68px;
  border: 3px solid #e0c020;
  background: rgba(50, 70, 16, 0.92);
  color: #f5f0a0;
  font-size: 11px;
  flex-shrink: 0;
  /* sit a couple “spaces” higher above BEER than the normal column gap */
  margin-bottom: 20px;
}
#btn-spray:active { background: #7a8a28; transform: scale(0.96); }
#btn-gas:disabled, #btn-spray:disabled {
  opacity: 0.4;
  border-color: #555;
  color: #888;
}

/* tiny fullscreen toggle under BEER */
#btn-fs {
  appearance: none;
  border: 1px solid rgba(90, 120, 80, 0.7);
  background: rgba(20, 40, 20, 0.75);
  color: #8a9a70;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
#btn-fs:active { background: rgba(40, 70, 40, 0.9); color: #d8f5d0; }

/* when the browser is in real fullscreen, dim the FS chip */
:fullscreen #btn-fs,
:-webkit-full-screen #btn-fs {
  opacity: 0.55;
}

/* desktop */
@media (min-width: 900px) {
  #stick { width: 260px; height: 260px; opacity: 0.85; }
  #knob { width: 112px; height: 112px; }
  #btn-fire { width: 100px; height: 100px; }
  #banner-text { font-size: 16px; max-width: 480px; }
}

/* large tablets */
@media (min-width: 768px) and (min-height: 500px) {
  #stick { width: 280px; height: 280px; }
  #knob { width: 120px; height: 120px; }
  #btn-fire { width: 110px; height: 110px; font-size: 16px; }
  #btn-gas { width: 84px; height: 84px; font-size: 13px; }
  #btn-spray { width: 84px; height: 84px; font-size: 12px; }
  #score { font-size: 24px; }
}

/* landscape play layout (only when user chose landscape) */
body.orient-landscape #controls {
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
body.orient-landscape #stick { width: 200px; height: 200px; }
body.orient-landscape #knob { width: 88px; height: 88px; }
body.orient-landscape #btn-whiskey { width: 58px; height: 58px; font-size: 9px; }
body.orient-landscape #btn-fire { width: 80px; height: 80px; font-size: 13px; }
body.orient-landscape #btn-gas { width: 64px; height: 64px; font-size: 11px; }
body.orient-landscape #btn-spray { width: 64px; height: 64px; font-size: 10px; }

/* ---- launch orientation pick ---- */
#orient-pick {
  width: min(420px, 94vw);
  margin: 4px 0 8px;
}
#orient-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #8aba70;
  margin-bottom: 10px;
  text-align: center;
}
#orient-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.orient-btn {
  appearance: none;
  flex: 1 1 140px;
  max-width: 180px;
  min-height: 88px;
  border: 2px solid #3a6a30;
  background: rgba(20, 40, 18, 0.9);
  color: #d8f5d0;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 10px;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  -webkit-user-select: none;
  user-select: none;
}
.orient-btn .orient-emoji {
  font-size: 28px;
  line-height: 1;
}
.orient-btn[data-orient="landscape"] .orient-emoji {
  display: inline-block;
  transform: rotate(90deg);
}
.orient-btn .orient-name {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #f0d060;
}
.orient-btn .orient-hint {
  font-size: 11px;
  color: #8a9a70;
  font-weight: 600;
}
.orient-btn:active { background: #2a5a20; }
.orient-btn.selected {
  border-color: #5dbb2b;
  background: #1a3a14;
  box-shadow: 0 0 0 2px rgba(93, 187, 43, 0.35);
}
#orient-pick.hidden { display: none; }

/* ---- rotate gate: wrong orientation vs launch choice ---- */
#rotate-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: #1a3a18;
  color: #d8f5d0;
  text-align: center;
  padding: 24px;
  touch-action: none;
}
#rotate-gate.hidden { display: none !important; }
#rotate-gate.show { display: flex; }
#rotate-card {
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#rotate-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 4px;
  animation: rotate-hint 1.6s ease-in-out infinite;
}
body.need-landscape #rotate-icon {
  transform: rotate(90deg);
  animation: none;
}
#rotate-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #f0d060;
}
#rotate-text {
  font-size: 15px;
  line-height: 1.5;
  color: #b8d8a8;
  font-weight: 600;
}
#btn-orient-switch {
  margin-top: 6px;
}
@keyframes rotate-hint {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(18deg); }
}

/* when gate is showing mid-play, freeze the app underneath.
   rotate-gate is a SIBLING of #app so SWITCH MODE still works. */
body.orient-mismatch.playing #app {
  visibility: hidden;
  pointer-events: none;
}
body.orient-mismatch #rotate-gate.show {
  display: flex;
}
/* never trap title menu behind a stuck mismatch class */
body:not(.playing).orient-mismatch #app {
  visibility: visible !important;
  pointer-events: auto !important;
}
body:not(.playing) #rotate-gate {
  display: none !important;
}
