/* SPEC S7.2: the first frame is the wall, not the page background. The kit fades the canvas in, and the boot hold hides the body until chrome fonts load. Either one would show the page colour where the wall should be. */
html.fx-hold body { opacity: 1; }
canvas { opacity: 1; transition: none; }

/* Spray Ground controls that are not the shared phone pad (SPEC S2, S3, S6). */

.sg-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 24;
  display: none;
  gap: 12px;
  pointer-events: auto;
}
.sg-dock button,
.sg-own-float,
.sg-own button,
.sg-mute {
  box-sizing: border-box;
  margin: 0;
  border: 2px solid var(--kit-accent, #ff4500);
  border-radius: 0;
  background: color-mix(in srgb, var(--kit-bg, #07130d) 88%, transparent);
  color: var(--kit-ink, #dff3e8);
  font: 700 10px/1.15 'Ioskeley Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.sg-dock button {
  min-width: 56px;
  height: 56px;
  padding: 4px 8px;
}
.sg-dice {
  width: 56px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.sg-dice svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; }
.sg-dice svg circle { fill: currentColor; stroke: none; }
.sg-own-float {
  position: fixed;
  z-index: 24;
  display: none;
  width: 96px;
  height: 56px;
  padding: 4px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (pointer: fine) {
  .sg-dock { display: flex; }
}
@media (pointer: coarse) {
  .sg-own-float { display: flex; }
}

.sg-own {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 36;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #07130d;
  color: #dff3e8;
  box-sizing: border-box;
}
.sg-own[hidden] { display: none; }
.sg-own label {
  flex: none;
  font: 700 12px/1.2 'Ioskeley Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sg-own input {
  flex: 1;
  min-width: 0;
  height: 44px;
  box-sizing: border-box;
  border: 2px solid var(--kit-accent, #ff4500);
  border-radius: 0;
  background: #0c1a14;
  color: #dff3e8;
  font: 700 16px/1 'Ioskeley Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 10px;
}
.sg-own button {
  flex: none;
  height: 44px;
  min-width: 72px;
  padding: 0 12px;
}
html.sg-own-open .gp__cluster {
  bottom: calc(var(--dh-safe-bottom, env(safe-area-inset-bottom, 0px)) + var(--gp-edge, 16px) + var(--sg-own-h, 64px));
}

/* A CRT on the ground. The screen is the link; the set around it is not. */
.sg-tv {
  position: fixed;
  z-index: 16;
  pointer-events: auto;
  min-width: 77px;
  min-height: 64px;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.5));
}
.sg-tv__ant {
  position: absolute;
  left: 18%;
  top: -16px;
  width: 42%;
  height: 18px;
  pointer-events: none;
}
.sg-tv__ant::before,
.sg-tv__ant::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 16px;
  background: #c8c2b4;
}
.sg-tv__ant::before { left: 30%; transform: rotate(-28deg); transform-origin: bottom center; }
.sg-tv__ant::after { left: 62%; transform: rotate(24deg); transform-origin: bottom center; }
.sg-tv__set {
  box-sizing: border-box;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 14px;
  gap: 5px;
  padding: 9px 7px 11px;
  background: linear-gradient(180deg, #4a4032 0%, #2a241c 38%, #14110e 100%);
  border: 2px solid #070605;
  border-radius: 12px 12px 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.28);
}
.sg-tv__screen {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #050605;
  border-radius: 42% / 12%;
  box-shadow: inset 0 0 0 3px #0b0b0b, inset 0 0 16px rgba(0, 0, 0, 0.7);
  color: inherit;
  text-decoration: none;
}
.sg-tv__screen:focus,
.sg-tv__screen:focus-visible {
  outline: 3px solid #ffd23a;
  outline-offset: 3px;
}
.sg-tv__screen img,
.sg-tv__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.sg-tv__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.sg-tv__cap {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  z-index: 1;
  padding: 3px 2px;
  background: rgba(4, 8, 6, 0.86);
  color: #f4f0e4;
  font: 700 8px/1.15 'Ioskeley Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.sg-tv__screen:hover .sg-tv__cap,
.sg-tv__screen:focus .sg-tv__cap { opacity: 1; }
.sg-tv__side {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  pointer-events: none;
}
.sg-tv__side i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #efe6d4, #6a6256 55%, #1a1612);
  box-shadow: 0 1px 0 #000;
}
@media (prefers-reduced-motion: reduce) {
  .sg-tv video { display: none; }
}

.sg-mute {
  position: fixed;
  top: 56px;
  right: 10px;
  z-index: 40;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sg-mute svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}
.sg-mute[aria-pressed='true'] .sg-mute__on,
.sg-mute:not([aria-pressed='true']) .sg-mute__off { display: none; }

/* S11: ENTER DOPE CITY, the Diamond Hands site's blue pill (its C280.9 values, copied under this page's own names): 56px tall (12px, a 32px line, 12px),
   24px side padding, 8px radius, #3523fe, white Univers Ultra Condensed 24px with 0.04em tracking. The display font sits its capitals about 3.5px above the
   line box's centre, so --sg-pill-nudge moves the label down inside the same 56px. Plain HTML over the page: bottom centre, under the TV (lower left) and
   the controls (dock right, pad on phones). It never moves and draws nothing on the canvas. */
@font-face { font-family: 'SG Pill'; src: url('fonts/univers-ultra-condensed.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
.sg-enter {
  --sg-pill-nudge: 3.5px;
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 24;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 56px;
  padding: calc(12px + var(--sg-pill-nudge)) 24px calc(12px - var(--sg-pill-nudge));
  border: 0;
  border-radius: 8px;
  background: #3523fe;
  color: #fff;
  text-decoration: none;
  font-family: 'SG Pill', 'Arial Narrow', sans-serif;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  gap: 0.22em;
  pointer-events: auto;
}
.sg-enter:hover { background: #4a3bff; }
.sg-enter:focus-visible { outline: 3px solid #ffd23a; outline-offset: 3px; }
html.sg-own-open .sg-enter { display: none; }
/* Phones (the shared pad fills the bottom edge; only the strip between its two clusters is free, 110px at 390 wide): the same pill stacked on two lines in that
   strip, under SPRAY YOUR OWN and level with the pad's bottom row. */
@media (max-width: 559px) {
  .sg-enter {
    --sg-pill-nudge: 3px;
    width: 104px;
    height: 68px;
    padding: calc(8px + var(--sg-pill-nudge)) 6px calc(8px - var(--sg-pill-nudge));
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 26px;
    text-align: center;
  }
}
