/* Tidy Towns — river sorting arcade game on /playground/tidy-towns/ */
/* The game stage keeps one riverside look in both themes; the page around it uses mv-biz tokens */

.mv-tt {
  --tt-accent: #7be08f;
  --tt-panel: rgba(8, 24, 19, 0.86);
  --tt-stage-ink: #f4f1e8;
  --tt-stage-muted: #c3cadb;
}

.mv-tt__inner {
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem max(1rem, env(safe-area-inset-right, 0px))
    calc(2rem + env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  color: var(--mv-biz-foreground);
}

.mv-tt__back {
  font-size: 0.875rem;
  color: var(--mv-biz-muted-fg);
  text-decoration: none;
}

.mv-tt__back:hover {
  color: var(--mv-biz-primary);
}

.mv-tt__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.mv-tt__brand {
  margin: 0;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--mv-biz-primary);
}

.mv-tt__hud {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--mv-biz-muted-fg);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mv-tt__hud b {
  display: block;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--mv-biz-foreground);
}

.mv-tt__stage {
  position: relative;
  height: min(70vh, 36rem);
  min-height: 25rem;
  overflow: hidden;
  border-radius: 16px;
  background: #10241f;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mv-tt__stage:focus-visible {
  outline: 3px solid var(--tt-accent);
  outline-offset: 2px;
}

.mv-tt__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mv-tt__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem;
  background: var(--tt-panel);
  color: var(--tt-stage-ink);
  text-align: center;
}

.mv-tt__overlay h2 {
  margin: 0;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.85rem;
  color: var(--tt-accent);
}

.mv-tt__overlay p {
  max-width: 30ch;
  margin: 0;
  line-height: 1.45;
  color: var(--tt-stage-muted);
}

.mv-tt__overlay .mv-tt__post {
  min-height: 1.4em;
  color: var(--tt-stage-ink);
  font-weight: 600;
}

.mv-tt__overlay .mv-tt__post a {
  color: var(--tt-accent);
}

.mv-tt__big {
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-size: 2.75rem;
}

.mv-tt__btn {
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tt-accent);
  color: #06240f;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.mv-tt__btn:focus-visible {
  outline: 3px solid var(--tt-stage-ink);
  outline-offset: 3px;
}

.mv-tt__tip {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--mv-biz-muted-fg);
}

.mv-tt__hud b.mv-tt__lives {
  color: #e0406f;
  letter-spacing: 2px;
}

[data-theme="myvillage-dark"] .mv-tt__hud b.mv-tt__lives {
  color: #ff7aa0;
}

.mv-tt__stage {
  cursor: grab;
}
