/* every color, font, and radius the pages use, in one :root block. a fork
   edits this block and config.php only. */

/* single design system, matched to the in-game screens: near-black canvas,
   violet panels floating on shadow (the game's own plates), condensed uppercase display type with the
   game's x marks, azure action, gold emphasis on black plaques, red alerts.
   colors sampled by eye from official screens; the logo is partner-supplied. */
:root {
  --canvas: #0c0e18;
  --canvas-ink: #f1f2f8;
  --canvas-dim: #8a91ad;
  --chrome: #090b13;
  --panel: #1a1e33;
  --panel-border: 1px solid rgba(159, 212, 255, .14);
  --panel-shadow: 0 2px 14px rgba(0, 0, 0, .55);
  --ink: #f1f2f8;
  --ink-dim: #9da5c2;
  --field: #232946;
  --field-border: 1px solid rgba(159, 212, 255, .1);
  --object: #272e4d;
  --accent: #1e96ff;
  --accent-ink: #ffffff;
  --danger: #e8443a;
  --danger-ink: #ffffff;
  --good: #1a9e55;
  --select: #f2c11f;
  --radius: 8px;
  --font: 'Rajdhani', 'Arial Narrow', system-ui, sans-serif;
  --head-font: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --head-transform: uppercase;
  --head-track: .05em;
  --head-marks: '\2715  \2715';
  --head-stripe: none;
  --head-stripe-h: 0px;
}

* { box-sizing: border-box; }
/* author display values must never resurrect a hidden element */
[hidden] { display: none !important; }
body {
  margin: 0; padding: 118px 16px 24px; color: var(--canvas-ink);
  font-family: var(--font); max-width: 480px; margin-inline: auto; font-size: 16px;
  /* the game never sits on flat black: faint engineering grid over a cold
     vignette, both fixed so panels slide over them */
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    radial-gradient(130% 90% at 50% 0%, #1e2340 0%, #121527 55%, #0c0e18 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  background-attachment: fixed;
}

/* header bar: chrome strip with the event logo or name */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 70px; z-index: 9;
  background: var(--chrome); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
}
/* the booth wall line, set as the game sets it: hairline weight, wide track */
.top-bar::before {
  content: 'HUMAN WILL RECLAIM THE SURFACE'; order: 2;
  font-family: var(--head-font); font-size: 9px; font-weight: 600;
  letter-spacing: .42em; color: #5b6478; text-indent: .42em;
}
.top-bar img { height: 40px; max-width: 60vw; object-fit: contain; display: block; }
.top-bar .top-name {
  font-family: var(--head-font); text-transform: var(--head-transform);
  letter-spacing: var(--head-track); font-weight: 700; font-size: 18px;
  color: var(--canvas-ink);
}

/* screen titles: display face, flanked by the ornament marks where the theme
   defines them, optional band underneath for the themes that use one */
h1 {
  font-size: 28px; margin: 14px 0 6px; font-family: var(--head-font);
  text-transform: var(--head-transform); letter-spacing: var(--head-track);
  font-weight: 700; text-align: center; color: var(--canvas-ink);
  text-wrap: balance;
  /* the white-to-sky fade on the booth wall lettering */
  background: linear-gradient(180deg, #ffffff 20%, #9fd4ff 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent; /* unslop-ignore */
}
h1::before { content: var(--head-marks) '\00a0\00a0'; color: var(--canvas-dim); font-weight: 400; font-size: .55em; vertical-align: .25em; }
h1::after  { content: '\00a0\00a0' var(--head-marks); color: var(--canvas-dim); font-weight: 400; font-size: .55em; vertical-align: .25em; }
h1 + .band { height: var(--head-stripe-h); background: var(--head-stripe); background-size: 10px 10px; margin-bottom: 8px; }
p { color: var(--canvas-dim); text-align: center; margin: 6px 0 14px; }

button, input, select {
  height: 48px; border-radius: var(--radius); border: var(--field-border);
  font-size: 16px; font-family: inherit; padding: 0 14px; width: 100%;
  background: var(--field); color: var(--ink); font-weight: 500;
}
button {
  background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600;
  text-transform: var(--head-transform); letter-spacing: var(--head-track); cursor: pointer;
  /* hazard-stripe end cap on the confirm colour, the game's go-button
     furniture. every other button sets background with the shorthand, which
     clears this image, so only azure actions carry it. */
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.22) 0 7px, transparent 7px 14px);
  background-size: 30px 100%; background-position: right center; background-repeat: no-repeat;
  /* the corner cut every nikke panel carries; same 10px as the plaque.
     clip-path swallows outlines, so button focus is the inset ring below,
     never an outline. */
  border-radius: 2px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
button.quiet  { background: var(--object); color: var(--ink); border: var(--panel-border); }
button.danger { background: var(--danger); color: var(--danger-ink); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card  {
  background: var(--panel); border: var(--panel-border); border-radius: 2px;
  padding: 20px; color: var(--ink);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  filter: drop-shadow(0 2px 14px rgba(0,0,0,.55));
}
.card p { color: var(--ink-dim); text-align: left; }
.card-label {
  font-family: var(--head-font); text-transform: var(--head-transform);
  letter-spacing: var(--head-track); font-weight: 600; font-size: 16px;
  color: var(--ink); margin-bottom: 10px;
}
/* labelled field: the question stays visible after the answer is typed */
.field-label {
  display: block; color: var(--ink-dim); font-size: 14px; font-weight: 600;
}
.field-label input { margin-top: 5px; }
/* slot objects: every cell reads as a thing, not a text button */
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-grid button {
  height: 52px; background: var(--object); color: var(--ink); border: var(--field-border);
  font-weight: 600; font-size: 16px; text-transform: none; letter-spacing: 0;
}
.slot-grid button.sel {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 0 0 0 3px var(--select);
}
.status { text-align: center; padding: 8px; color: var(--canvas-dim); }
.card .status { color: var(--ink-dim); }
.flag { color: var(--danger); font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.big {
  font-size: 34px; font-weight: 700; text-align: center; color: var(--ink);
  font-family: var(--head-font); letter-spacing: var(--head-track);
}
a { color: var(--accent); }


/* boot sequence: the screen assembles the way a game screen does. one pass,
   staged, decisive, under a second total: diagonal wipe clears, chrome drops
   in, checker strip draws, title snaps its tracking tight, plaque lands with
   overshoot, panels rise last. every element animates exactly once. */
@keyframes cq-wipe {
  from { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  to   { clip-path: polygon(-40% 0, 0 0, -140% 100%, -180% 100%); }
}
@keyframes cq-drop  { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes cq-draw  { from { transform: scaleX(0); } to { transform: none; } }
@keyframes cq-title { from { opacity: 0; letter-spacing: .35em; } to { opacity: 1; letter-spacing: var(--head-track); } }
@keyframes cq-land  { 0% { opacity: 0; transform: translateY(14px) scale(.97); }
                      70% { opacity: 1; transform: translateY(-2px) scale(1.015); }
                      100% { opacity: 1; transform: none; } }
@keyframes cq-in    { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cq-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes cq-pop   { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

#cq-boot {
  position: fixed; inset: 0; z-index: 99; background: var(--chrome);
  animation: cq-wipe .42s cubic-bezier(.7, 0, .3, 1) .12s both;
  pointer-events: none;
}
.top-bar { animation: cq-drop .32s cubic-bezier(.2, .9, .3, 1) .1s both; }
.top-bar::after { transform-origin: left; animation: cq-draw .3s cubic-bezier(.2, .9, .3, 1) .4s both; }
h1 { animation: cq-title .4s cubic-bezier(.2, .9, .3, 1) .35s both; }
h1 + .band, body > .stack > p, #cq-app > p { animation: cq-in .3s ease-out .45s both; }
.plaque { animation: cq-land .38s cubic-bezier(.2, .9, .3, 1.1) both; }
#cq-next .plaque { animation-delay: .5s; }
.card { animation: cq-land .4s cubic-bezier(.2, .9, .3, 1.05) .58s both; }
.card:nth-of-type(2) { animation-delay: .62s; }
.card:nth-of-type(3) { animation-delay: .7s; }

button { transition: transform .12s ease, filter .15s ease; }
button:active { transform: scale(.96); }
button:hover { filter: brightness(1.06); }
.status:empty { display: none; }
#sh-queue .status { animation: cq-pulse 1.4s ease-in-out infinite; }
.big { animation: cq-in .3s ease-out both; }



/* nikke accents: the black plaque with notched corners and gold figures, the
   checkered strip under the chrome bar, and visible focus. all from the
   game's own component vocabulary, none of it load-bearing. */
.top-bar::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 6px;
  background: repeating-conic-gradient(#16181d 0 25%, #0d0e12 0 50%);
  background-size: 12px 12px;
}
.plaque {
  background: #101216; color: var(--select); border-radius: 2px;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  padding: 10px 26px; text-align: center; font-family: var(--head-font);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.plaque .plaque-label {
  display: block; color: var(--canvas-dim); font-size: 12px; font-weight: 600;
  letter-spacing: .18em;
}
.plaque .plaque-value { display: block; font-size: 26px; line-height: 1.15; }
.card .plaque { margin-inline: -4px; }
input:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}
button:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--select); }
.card .card-label::after {
  content: ''; display: block; height: 2px; margin-top: 6px;
  background: linear-gradient(90deg, var(--accent) 0 44px, rgba(159, 212, 255, .16) 44px);
}

.sf-btn-link { display: block; text-decoration: none; }
.sf-btn-link button { width: 100%; }

/* ---- tetra uplink boot ----------------------------------------------------
   the wipe overlay carries the tetra mark and a handshake line before it
   clears: the page arrives as a network the guest just joined. */
#cq-boot { display: flex; align-items: center; justify-content: center;
  animation-delay: 1.05s; animation-duration: .5s; }
.tq-inner { display: grid; gap: 12px; justify-items: center; }
.tq-mark { width: 200px; opacity: 0; animation: cq-in .35s ease-out .1s forwards; }
.tq-line { font-family: var(--head-font); font-size: 11px; font-weight: 600;
  letter-spacing: .42em; text-indent: .42em; color: #565e7e;
  animation: cq-in .3s ease-out .4s both; }
.tq-band { width: 120px; height: 3px; background: var(--accent); transform-origin: left;
  animation: cq-draw .35s cubic-bezier(.2, .9, .3, 1) .6s both; }
/* the page assembles behind the longer boot */
.top-bar { animation-delay: 1.05s; }
.top-bar::after { animation-delay: 1.35s; }
h1 { animation-delay: 1.3s; }
h1 + .band, body > .stack > p, #cq-app > p { animation-delay: 1.4s; }
.card { animation-delay: 1.5s; }
.card:nth-of-type(2) { animation-delay: 1.58s; }
.card:nth-of-type(3) { animation-delay: 1.66s; }

/* ---- field protocol -------------------------------------------------------
   short, skimmable, above the submit: the agreement is part of the act of
   joining, not fine print behind a link. */
.tq-rules { border-top: 1px solid rgba(159, 212, 255, .14); padding-top: 12px; }
.tq-rules-head { font-family: var(--head-font); text-transform: uppercase;
  letter-spacing: .18em; font-size: 13px; font-weight: 700; color: var(--select); }
.tq-rules-lead { text-align: left; margin: 6px 0 4px; color: var(--ink); font-size: 14px; font-weight: 600; }
.tq-rules ol { margin: 0; padding-left: 20px; color: var(--ink-dim); font-size: 13.5px; line-height: 1.45; }
.tq-rules li { margin: 2px 0; }
.tq-foot { display: block; height: 16px; margin: 6px auto 0; opacity: .55; }

.cq-notice { font-size: 13px; color: var(--ink-dim); margin: 4px 0 0; }

.cq-warn { font-family: var(--head-font); font-size: 14px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--danger, #d5222e);
  padding: 6px 0; }
