/* Privacy is a system screen beneath the CRT's existing glass and raster. */
.privacy-panel {
  color: #bfd0aa;
  background: #0a1712;
  box-sizing: border-box;
}
.privacy-crt {
  position: absolute;
  inset: 0;
  z-index: 3;
  container-type: size;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #14251be8, #07130ff5);
  color: var(--tube-ink, #b6d79d);
  text-shadow:
    0 0 1px #bfec9c70,
    0 0 4px #a5da743d;
}
.privacy-content {
  width: 82%;
  margin: auto;
}
.privacy-crt .privacy-content {
  font:
    400 min(2.5cqw, 3.4cqh)/1.3 MenuText,
    monospace;
}
.privacy-panel p,
.privacy-panel h2 {
  margin: 0;
}
.privacy-panel .privacy-kicker {
  font:
    400 0.65em/1.4 Pixel,
    monospace;
  color: #93a782;
  letter-spacing: 0.07em;
}
.privacy-panel h2 {
  font:
    400 2em/1.1 MenuDisplay,
    monospace;
  margin: 0.35em 0 0.5em;
}
.privacy-description {
  max-width: 43em;
}
.privacy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
  margin: 0.8em 0;
}
.privacy-actions button {
  font:
    400 1.3em/1.1 MenuDisplay,
    monospace;
  color: #91a783;
  text-shadow: inherit;
  border: 0;
  background: transparent;
  padding: 0.65em 0.7em;
  text-align: center;
  cursor: pointer;
}
.privacy-actions button::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.65em;
  margin-right: 0.55em;
  opacity: 0;
  background: currentColor;
  clip-path: polygon(
    0 0,
    30% 0,
    30% 15%,
    60% 15%,
    60% 30%,
    100% 30%,
    100% 70%,
    60% 70%,
    60% 85%,
    30% 85%,
    30% 100%,
    0 100%
  );
}
.privacy-actions button.is-selected {
  color: var(--tube-bright, #d0e8b6);
  background: linear-gradient(
    90deg,
    transparent,
    #95ad7720 15%,
    #95ad7720 85%,
    transparent
  );
  text-shadow:
    0 0 1px #d0e8b680,
    0 0 5px #a5da7460;
}
.privacy-actions button.is-selected::before {
  opacity: 1;
}
.privacy-panel :focus { outline: none; }
.privacy-panel :is(.privacy-policy, .privacy-zoom).game-selected {
  color: #e0edbd;
  text-shadow: 0 0 5px #c4e49380;
}
.privacy-policy.game-selected { text-decoration: underline; text-underline-offset: .2em; }
.privacy-zoom.game-selected svg { filter: drop-shadow(0 0 2px #c4e49390); }
@media (forced-colors: active) {
  .privacy-panel :focus-visible { outline: 2px solid Highlight; }
}
.privacy-panel:focus {
  outline: none;
}
.privacy-panel .privacy-note {
  font-size: 0.78em;
  color: #9caf90;
  margin-top: 1em;
}
.privacy-policy {
  display: inline-block;
  font-size: 0.72em;
  color: #b6c8a2;
  margin-top: 1em;
}
.consent-open #object-world {
  visibility: hidden;
}
.consent-open .screen-inner {
  visibility: hidden;
}
.boot-pending .privacy-crt,
.powered-off .privacy-crt,
.computer-off .privacy-crt {
  visibility: hidden;
}
.system-tools {
  display: flex;
  align-items: center;
  gap: 0.55cqw;
}
.system-tools .system-icon {
  display: grid;
  place-items: center;
  padding: 0.3cqw;
  color: inherit;
  opacity: 0.8;
}
.system-icon svg {
  width: 1.05cqw;
  height: 1.05cqw;
  fill: currentColor;
  stroke: none;
  shape-rendering: crispEdges;
}
.system-tools .system-icon.game-selected {
  opacity: 1;
}
@media (max-width: 700px), (max-height: 500px) {
  body.zoomed .privacy-crt .privacy-content {
    font-size: min(4.2cqw, 3.4cqh);
    width: 82%;
  }
  body.zoomed .system-icon svg {
    width: 14px;
    height: 14px;
  }
  body.zoomed .system-tools .system-icon {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
  }
  body.zoomed .system-tools {
    gap: 2px;
  }
}
/* The same choice is available when someone enters via /letstalk or legal pages. */
.privacy-standalone {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  align-items: center;
  overflow: auto;
  background: #07130ff5;
  padding: 24px;
  font: 16px/1.5 monospace;
}
.privacy-standalone .privacy-content {
  max-width: 520px;
  width: 100%;
  padding: 24px 0;
}
.privacy-reopen {
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}

.privacy-zoom {
  position: absolute;
  right: 7%;
  top: 5%;
  padding: 0.4em;
  border: 0;
  background: none;
  color: #93a782;
  cursor: pointer;
}
.privacy-zoom svg {
  width: 3.3cqw;
  height: 2cqw;
  fill: currentColor;
}

@media (max-width: 700px) and (orientation: portrait) {
  body.zoomed .privacy-actions button {
    min-height: 44px;
  }
}

.privacy-eyes {
  width: 1.6em;
  height: 0.9em;
  vertical-align: -0.08em;
  overflow: visible;
}
.privacy-pupils {
  animation: privacy-glance 11.3s steps(2, end) infinite;
}
.privacy-eyelids {
  transform-box: fill-box;
  transform-origin: center;
  animation: privacy-blink 7.7s steps(1, end) infinite;
}
.privacy-panel .privacy-provider {
  font-size: 0.78em;
  color: #9caf90;
}
@keyframes privacy-glance {
  0%,
  8%,
  34%,
  42%,
  86%,
  100% {
    transform: translateX(-2px);
  }
  11%,
  29%,
  70%,
  78% {
    transform: translateX(-5px);
  }
  45%,
  57% {
    transform: translateX(0);
  }
}
@keyframes privacy-blink {
  0%,
  14%,
  17%,
  51%,
  57%,
  83%,
  100% {
    transform: scaleY(1);
  }
  15%,
  16%,
  52%,
  53%,
  55%,
  56% {
    transform: scaleY(0.08);
  }
  70%,
  80% {
    transform: scaleY(0.7);
  }
}
@media (prefers-reduced-motion: reduce) {
  .privacy-pupils,
  .privacy-eyelids {
    animation: none;
  }
}

.privacy-reopen.game-selected { color: #e0edbd; text-decoration: underline; text-underline-offset: .2em; }

/* A native scroll surface and its CRT indicator never paint two tracks. */
/* The long legal reader reserves its rail from first paint. Attaching the
   scrollbar after an End keypress must never rewrap the final lines. */
.crt-document, [data-scroll-owner] {
  scrollbar-width: none !important;
  border-inline-end: var(--crt-rail-gutter, 12px) solid transparent;
}
.crt-document::-webkit-scrollbar, [data-scroll-owner]::-webkit-scrollbar { display:none !important; }
.screen-inner { --crt-rail-gutter: clamp(5px, .65cqw, 12px); }
.crt-scroll-rail {
  --rail-edge: #53674e;
  position: absolute; z-index: 2; right: 1px;
  width: var(--crt-rail-gutter, 12px); box-sizing:border-box;
  touch-action: none; user-select:none; cursor:pointer;
}
.crt-scroll-rail::before {
  content:""; position:absolute; inset-block:0; right:var(--rail-inset,0px);
  width:var(--rail-paint,100%); box-sizing:border-box;
  background:repeating-linear-gradient(0deg,#0c1912 0 2px,#233326 2px 3px);
  border:1px solid var(--rail-edge);
}
html:has(.privacy-standalone) { overflow:hidden; }
.crt-scroll-rail[hidden] { display:none; }
.crt-scroll-rail span {
  display:block; width:var(--rail-paint,100%); position:absolute; top:0; right:var(--rail-inset,0px); box-sizing:border-box;
  background:#a9be92; border-block:1px solid; border-color:#d5e4b9 #627b59;
  box-shadow:inset -1px 0 #768b68; cursor:grab;
}
.crt-scroll-rail:active span { cursor:grabbing; }
.crt-scroll-rail:focus-visible { outline:1px solid #d9ecc0; outline-offset:1px; }
@media (max-width:700px), (max-height:500px) {
  body.zoomed .screen-inner, body:not(:has(#screen)) {
    --crt-rail-gutter:12px; --rail-paint:4px; --rail-inset:2px;
  }
  .crt-scroll-rail::after { content:""; position:absolute; inset:0 -12px 0 auto; width:12px; }
  .crt-scroll-rail span { background:#98ae87; }
}
@media (forced-colors:active) {
  .crt-scroll-rail::before { border-color:CanvasText; background:Canvas; }
  .crt-scroll-rail span { forced-color-adjust:none; background:ButtonText; }
}

/* The consent dialog alone borrows the compact CRT frame. Dismissing it
   reveals the visitor's chosen room view without changing the zoom state. */
@media (max-width: 700px), (max-height: 500px) {
  .privacy-crt { overflow-y: auto; }
  .privacy-crt .privacy-zoom { display: none; }
  body.consent-open .privacy-crt .privacy-content {
    width: 86%;
    padding-block: 16px;
    font-size: clamp(16px, 3cqw, 20px);
  }
  .privacy-crt :is(.privacy-note, .privacy-provider) { font-size: max(.82em, 14px); }
  .privacy-crt .privacy-actions button { min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  body.consent-open .privacy-crt .privacy-content {
    width: 90%;
    padding-block: 8px;
    font-size: 16px;
  }
  .privacy-crt h2 { font-size: 1.6em; margin-block: .2em; }
  .privacy-crt .privacy-actions { margin-block: .25em; }
  .privacy-crt .privacy-actions button { padding-block: .2em; }
  .privacy-crt :is(.privacy-policy, .privacy-note) { margin-top: .35em; }
}
