@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;700&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap");

/* Full-bleed game page — hide Material chrome ( :has works before JS ) */
html.floor-page,
html:has(#floor-root),
html.floor-page body,
html:has(#floor-root) body {
  background: #070707 !important;
  overflow: hidden;
}
html.floor-page .md-header,
html:has(#floor-root) .md-header,
html.floor-page .md-tabs,
html:has(#floor-root) .md-tabs,
html.floor-page .md-sidebar,
html:has(#floor-root) .md-sidebar,
html.floor-page .md-footer,
html:has(#floor-root) .md-footer,
html.floor-page .md-dialog,
html:has(#floor-root) .md-dialog,
html.floor-page .md-content__button,
html:has(#floor-root) .md-content__button,
html.floor-page .md-typeset > h1,
html:has(#floor-root) .md-typeset > h1,
html.floor-page .md-typeset > p,
html:has(#floor-root) .md-typeset > p {
  display: none !important;
}
html.floor-page .md-main,
html:has(#floor-root) .md-main,
html.floor-page .md-main__inner,
html:has(#floor-root) .md-main__inner,
html.floor-page .md-content,
html:has(#floor-root) .md-content,
html.floor-page .md-content__inner,
html:has(#floor-root) .md-content__inner,
html.floor-page .md-grid,
html:has(#floor-root) .md-grid {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
html.floor-page .md-typeset,
html:has(#floor-root) .md-typeset {
  font-size: inherit;
}

.floor-root {
  --ink: #f4f1ea;
  --muted: #8a867c;
  --dim: #3a3834;
  --gold: #c4a35a;
  --gold-2: #e8d7a3;
  --void: #070707;
  --danger: #c45a4a;
  --ok: #7a9a6a;
  position: relative;
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  background: var(--void);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.floor-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.floor-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.floor-grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.floor-hurt {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(196, 90, 74, 0.55) 100%);
  transition: opacity 80ms linear;
}
.floor-hurt.is-on {
  opacity: 1;
}

.floor-cross {
  display: none;
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
}
.floor-cross.is-on {
  display: block;
}
.floor-cross::before,
.floor-cross::after {
  content: "";
  position: absolute;
  background: var(--gold);
  opacity: 0.9;
}
.floor-cross::before {
  left: 10px;
  top: 3px;
  width: 2px;
  height: 16px;
}
.floor-cross::after {
  left: 3px;
  top: 10px;
  width: 16px;
  height: 2px;
}

.floor-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  pointer-events: none;
}
.floor-hud a,
.floor-hud button {
  pointer-events: auto;
}
.floor-brand {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.floor-exit {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none !important;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 2px;
  background: none;
  border-radius: 0;
}
.floor-exit:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.floor-playhud {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 18px 24px 22px;
  pointer-events: none;
}
.floor-playhud.is-on {
  display: block;
}
.floor-bars {
  display: grid;
  gap: 8px;
  max-width: 280px;
}
.floor-bar {
  height: 8px;
  background: #161616;
  border: 1px solid #2a2a2a;
}
.floor-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transform-origin: left center;
}
.floor-bar.is-hp > i {
  background: var(--gold);
}
.floor-bar.is-heat > i {
  background: var(--danger);
}
.floor-bar-label {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.floor-stats {
  position: absolute;
  right: 24px;
  bottom: 22px;
  text-align: right;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
}
.floor-stats b {
  color: var(--gold);
  font-weight: 400;
}

.floor-banner {
  display: none;
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  z-index: 4;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: clamp(28px, 6vw, 52px);
  color: var(--gold);
  text-shadow: 0 0 24px rgba(196, 163, 90, 0.35);
}
.floor-banner.is-on {
  display: block;
}

.floor-gun {
  display: none;
  position: absolute;
  right: -2%;
  bottom: -6%;
  width: min(62vw, 760px);
  z-index: 3;
  pointer-events: none;
  transform-origin: 78% 100%;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.7));
  transition: transform 60ms linear;
}
.floor-gun.is-on {
  display: block;
}
.floor-root.is-kick .floor-gun {
  transform: translate(12px, 16px) rotate(-2.2deg);
}

.floor-target {
  display: none;
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 4;
  transform: translateX(-50%);
  pointer-events: none;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 14px #000;
}
.floor-target.is-on {
  display: block;
}
.floor-target b {
  display: block;
  font-weight: 700;
  font-size: 18px;
}
.floor-target span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink);
  opacity: 0.85;
}

.floor-stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(7, 7, 7, 0.22) 0%, rgba(7, 7, 7, 0.66) 100%);
}
.floor-stage.is-off {
  display: none;
}

.floor-kicker {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 18px;
}
.floor-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 300;
  font-size: clamp(56px, 14vw, 120px);
  line-height: 0.9;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 20px;
  color: var(--ink);
}
.floor-sub {
  max-width: 440px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}
.floor-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 36px;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--dim);
}
.floor-keys b {
  color: var(--gold);
  font-weight: 400;
}

.floor-btn {
  appearance: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--gold);
  border: 0;
  border-radius: 0;
  min-height: 52px;
  min-width: 220px;
  padding: 0 28px;
  cursor: pointer;
}
.floor-btn:hover {
  background: var(--gold-2);
}
.floor-btn:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}
.floor-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.floor-hint {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.floor-results {
  display: none;
  width: min(720px, 92vw);
  text-align: left;
}
.floor-results.is-on {
  display: block;
}
.floor-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #222;
  margin: 8px 0 28px;
}
.floor-metric {
  background: var(--void);
  padding: 22px 16px 18px;
}
.floor-metric b {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 300;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1;
}
.floor-metric span {
  display: block;
  margin-top: 8px;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.floor-recs {
  display: grid;
  gap: 1px;
  background: #222;
  margin-bottom: 28px;
}
.floor-rec {
  display: block;
  background: #101010;
  padding: 16px 18px;
  color: var(--ink) !important;
  text-decoration: none !important;
}
.floor-rec:hover {
  background: #161616;
}
.floor-rec strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 4px;
}
.floor-rec em {
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.floor-note {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 22px;
}

.floor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.floor-home-cta {
  margin: 1.6rem 0 0;
}
.floor-home-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px 4px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 15px;
  color: inherit !important;
  text-decoration: none !important;
  border-bottom: 1px solid #c4a35a;
}
.floor-home-cta a:hover {
  color: #c4a35a !important;
}

.floor-touch {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.floor-touch.is-on {
  display: block;
}
.floor-stick {
  pointer-events: auto;
  position: absolute;
  left: 20px;
  bottom: 28px;
  width: 118px;
  height: 118px;
  border: 1px solid #3a3834;
  border-radius: 50%;
  background: rgba(7, 7, 7, 0.35);
}
.floor-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.85;
}
.floor-fire {
  pointer-events: auto;
  position: absolute;
  right: 22px;
  bottom: 36px;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--void);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
}
.floor-fire:active {
  background: var(--gold-2);
}

@media (max-width: 640px) {
  .floor-metrics {
    grid-template-columns: 1fr;
  }
  .floor-stats {
    right: 16px;
    bottom: 132px;
  }
  .floor-bars {
    max-width: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floor-hurt {
    transition: none;
  }
}
