/* Trust Me — menus and HUD. The game itself is drawn on the canvas. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #2b2140; color: #2b2140; overflow: hidden; overscroll-behavior: none;
  font-family: "Fredoka", "Baloo 2", "Chalkboard SE", "Comic Sans MS", "Trebuchet MS", sans-serif; font-weight: 500;
  -webkit-user-select: none; user-select: none; touch-action: none; }
body { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.hidden { display: none !important; }

#stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9;
  background: #8fd6ff; overflow: hidden; container-type: size; font-size: 2.1vw; }
@supports (font-size: 1cqw) { #stage { font-size: 2.05cqw; } }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0.6em 0.8em; pointer-events: none; }
.hud-side { display: flex; align-items: center; gap: 0.45em; pointer-events: auto; }
.pill { background: #fff8e0; border: 0.18em solid #2b2140; border-radius: 99em; padding: 0.22em 0.8em; font-weight: 700; font-size: 0.82em; white-space: nowrap; }
.pill-fail { background: #ffd9d2; }
.pill-fail.bump { animation: bump 0.45s; }
@keyframes bump { 30% { transform: scale(1.35) rotate(-6deg); background: #e8503a; color: #fff; } }
.hud-btn { width: 2.1em; height: 2.1em; min-width: 34px; min-height: 34px; border-radius: 50%; border: 0.16em solid #2b2140; background: #fff; color: #2b2140; font: inherit; font-weight: 700; font-size: 1em;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.hud-btn:active { transform: scale(0.92); }
.hud-btn.off { opacity: 0.45; text-decoration: line-through; }
.hud-hint { background: #ffe066; animation: wiggle 1.6s infinite; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-14deg); } 86% { transform: rotate(12deg); } 94% { transform: rotate(-6deg); } }

#skipOffer { position: absolute; left: 50%; bottom: 0.7em; transform: translateX(-50%); background: #fff8e0; border: 0.18em solid #2b2140; border-radius: 1em; padding: 0.35em 0.5em 0.35em 0.9em;
  display: flex; align-items: center; gap: 0.7em; font-size: 0.82em; font-weight: 700; white-space: nowrap; }

.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(43, 33, 64, 0.45); padding: 1em; }
#title { background: linear-gradient(rgba(43, 33, 64, 0.05), rgba(43, 33, 64, 0.4)); align-items: flex-start; padding-top: 1.6em; }
.card { background: #fff8e0; border: 0.22em solid #2b2140; border-radius: 1.3em; padding: 1em 1.5em; text-align: center; max-width: 82%; max-height: 96%; overflow: auto; box-shadow: 0 0.35em 0 #2b2140; }
.card-wide { width: 90%; max-width: 90%; }
.card-title { background: rgba(255, 248, 224, 0.94); }
.card h2 { margin: 0 0 0.3em; font-size: 1.7em; font-weight: 700; }
.card p { margin: 0.3em 0; font-size: 1.05em; }
.logo { margin: 0; font-size: 4em; line-height: 1; font-weight: 700; color: #e8503a; letter-spacing: 0.02em; -webkit-text-stroke: 0.05em #2b2140; text-shadow: 0.06em 0.07em 0 #2b2140; transform: rotate(-3deg); }
.tag { font-weight: 700; }
.small { font-size: 0.72em !important; opacity: 0.85; }
.small a { color: #5b3fd6; }
.row { display: flex; gap: 0.6em; justify-content: center; align-items: center; margin-top: 0.7em; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 700; font-size: 1em; padding: 0.4em 1.1em; min-height: 40px; border-radius: 99em; border: 0.18em solid #2b2140; background: #fff; color: #2b2140; cursor: pointer; box-shadow: 0 0.2em 0 #2b2140; }
.btn:active { transform: translateY(0.15em); box-shadow: 0 0.05em 0 #2b2140; }
.btn-big { background: #7ed957; font-size: 1.25em; padding: 0.4em 1.5em; }
.btn-small { font-size: 0.95em; min-height: 32px; padding: 0.25em 0.9em; background: #ffe066; }

#mapGrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.45em; margin: 0.4em 0; }
.lv { font: inherit; border: 0.16em solid #2b2140; border-radius: 0.7em; background: #f1c98a; padding: 0.3em 0.2em; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-height: 44px; color: #2b2140; }
.lv b { font-size: 1.05em; }
.lv span { font-size: 0.6em; font-weight: 700; }
.lv i { font-size: 0.58em; font-style: normal; opacity: 0.8; }
.lv.done { background: #b9ecA0; }
.lv.skipped { background: #ffe066; }
.lv.locked { background: #d9d3e6; opacity: 0.6; cursor: default; }

#creditList { max-height: 13em; overflow: auto; font-size: 0.9em; margin: 0.4em 0; }
#creditList div { display: flex; justify-content: space-between; gap: 1em; padding: 0.12em 0.6em; }
#creditList div:nth-child(odd) { background: rgba(43, 33, 64, 0.06); }
#creditList b { font-weight: 700; }

#rotateTip { display: none; color: #fff8e0; font-size: 14px; margin: 14px 0 0; opacity: 0.8; }
@media (orientation: portrait) and (max-width: 700px) { #rotateTip { display: block; } }
