/* After Hours — playground. Dim chrome, full stage. */

html[data-world="after-hours"] {
  background: #0a0807;
}

html[data-world="after-hours"] body {
  background:
    radial-gradient(90% 50% at 50% 0%, #1c1610 0%, transparent 52%),
    #0a0807;
  color: var(--w-fg);
}

html[data-world="after-hours"] .skip:focus {
  background: #1c1610;
  color: var(--w-fg);
}

.night {
  position: relative;
  padding-bottom: 2.2rem;
}

.night::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.night-intro {
  position: relative;
  z-index: 1;
  padding: 2rem 0 0.8rem;
}

.night-intro h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.8rem);
  max-width: 12ch;
  margin: 0 0 0.4rem;
}

.night-lede {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--w-muted);
}

.console {
  position: relative;
  z-index: 1;
  padding: 0.4rem 0 0.7rem;
}

.modes {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.modes::-webkit-scrollbar { display: none; }

.modes button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--w-muted);
  padding: 0.62rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.modes button:hover { color: var(--w-fg); }

.modes button.is-on {
  color: var(--w-gold);
  border-bottom-color: var(--w-gold);
}

.console-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2rem;
  margin-top: 0.35rem;
}

.hint {
  margin: 0;
  color: var(--w-muted);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
}

.console-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ghost {
  border: 1px solid color-mix(in srgb, var(--w-gold) 35%, transparent);
  background: transparent;
  color: var(--w-gold);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ghost[hidden] { display: none; }
.ghost[aria-pressed="true"] {
  background: color-mix(in srgb, var(--w-gold) 16%, transparent);
  color: #fff4d8;
}

.stage {
  position: relative;
  z-index: 1;
  height: min(72vh, 780px);
  min-height: 420px;
  background: #070605;
  border: 1px solid color-mix(in srgb, var(--w-gold) 18%, transparent);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.send-chip {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--w-gold) 50%, transparent);
  background: color-mix(in srgb, #1a1510 72%, transparent);
  color: #f3e6c8;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.send-chip[hidden] { display: none; }
.send-chip:hover { border-color: var(--w-gold); }

.night-close {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 2rem;
}

.owner {
  max-width: 36rem;
  color: var(--w-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.room-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  color: var(--w-gold);
  font-size: 0.95rem;
  margin: 0 0 1.2rem;
}

.room-links a {
  color: var(--w-gold);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--w-gold) 40%, transparent);
}

.room-links a:hover { color: var(--w-fg); }

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.share-bar[hidden] { display: none; }

.toast {
  min-height: 1.4em;
  margin: 0.7rem 0 0;
  color: var(--w-muted);
  font-size: 0.9rem;
}

html[data-world="after-hours"] .site-footer {
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 640px) {
  .stage {
    height: min(68vh, 640px);
    min-height: 380px;
  }
  .console-row { flex-direction: column; align-items: stretch; }
  .modes { mask-image: none; }
}

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