/* TekAddict games: shared full-screen button and full-screen layout. */
.tek-fs-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid rgba(125, 255, 58, 0.6);
  background: rgba(125, 255, 58, 0.08);
  color: #b6ff3b;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.tek-fs-btn svg { width: 14px; height: 14px; flex: none; display: block; }
.tek-fs-btn:hover,
.tek-fs-btn:focus-visible { color: #fff; border-color: #7dff3a; box-shadow: 0 0 10px rgba(125, 255, 58, 0.45); outline: none; }
.tek-fs-btn .tek-fs-ic-exit { display: none; }
.tek-fs-on .tek-fs-btn .tek-fs-ic-enter { display: none; }
.tek-fs-on .tek-fs-btn .tek-fs-ic-exit { display: block; }

/* Full-screen state (real Fullscreen API and the CSS fallback share it). */
.tek-fs-on {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: #050814;
}
.tek-fs-on:fullscreen { width: 100vw; height: 100vh; }
.tek-fs-on:-webkit-full-screen { width: 100vw; height: 100vh; }
.tek-fs-on::backdrop { background: #050814; }
.tek-fs-fake {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
html.tek-fs-lock,
html.tek-fs-lock body { overflow: hidden !important; overscroll-behavior: none; }
.tek-fs-on > * { flex: 0 0 auto; }
.tek-fs-on > .tek-fs-stage { margin: auto !important; max-width: 100%; }
.tek-fs-on > .tek-fs-stage + * { margin-top: 6px; }
.tek-fs-on > .tek-fs-grow { flex: 1 1 auto; min-height: 220px; }
.tek-fs-on > .tek-fs-grow { display: flex; flex-direction: column; overflow: hidden; }
.tek-fs-on > .tek-fs-grow > .tg-term { flex: 1 1 auto; height: auto !important; min-height: 0; }
.tek-fs-on .tg-controls,
.tek-fs-on .ai-controls,
.tek-fs-on .gs-controls,
.tek-fs-on .tg-answers,
.tek-fs-on .tg-choices { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.tek-fs-on .tg-hud,
.tek-fs-on .ai-hud,
.tek-fs-on .gs-hud { position: sticky; top: 0; z-index: 3; }
.tg-shell canvas,
.ai-shell canvas,
.gs-shell canvas,
.tek-fs-btn { -webkit-tap-highlight-color: transparent; }

/* Landscape with touch controls: game on the left, controls in a column on the right. */
.tek-fs-on.tek-fs-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 16px;
}
.tek-fs-on.tek-fs-side > .tg-hud,
.tek-fs-on.tek-fs-side > .ai-hud,
.tek-fs-on.tek-fs-side > .gs-hud { grid-column: 1 / -1; grid-row: 1; }
.tek-fs-on.tek-fs-side > .tek-fs-stage { grid-column: 1; grid-row: 2; place-self: center; margin: 0 !important; }
.tek-fs-side-col { grid-column: 2; grid-row: 2; align-self: center; display: flex; flex-direction: column; min-width: 0; padding-right: 16px; }
.tek-fs-side-col > * { flex: 0 0 auto; }
.tek-fs-on .tek-fs-side-col .tg-controls,
.tek-fs-on .tek-fs-side-col .ai-controls,
.tek-fs-on .tek-fs-side-col .gs-controls { margin-top: 8px; max-width: none; }
/* Text and terminal games: keep a readable, centered column on big screens. */
.tek-fs-on > .tek-fs-grow { width: 100%; max-width: 1000px; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }
.tek-fs-on > .tg-status,
.tek-fs-on > .tg-q,
.tek-fs-on > .tg-feedback,
.tek-fs-on > .tg-term-quick,
.tek-fs-on > .tg-keypad { width: 100%; max-width: 1000px; margin-left: auto; margin-right: auto; box-sizing: border-box; }


/* Block long-press text highlight and the iOS Copy / Copy all callout
   on game pages. Inputs, textareas and contenteditable fields stay typable.
   No global touch-action is set here, so page scrolling and each game's
   existing touch controls (including Don't Open the Door) keep working. */
html, body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.tg-shell, .ai-shell, .gs-shell, .dd-shell,
.tg-stage, .ai-stage, .gs-stage, .dd-stage,
.games-hub, .game-tile,
.tg-shell canvas, .ai-shell canvas, .gs-shell canvas, .dd-shell canvas {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
html input, html textarea, html select,
html [contenteditable], html [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
