/* =============================================================================
   RemedyFungus — KEEPSAKE GATE
   Shared styles for the five auth-gate shells (hvd, imissyou, wheel,
   discord_chat, remedyfungus-archive). Each shell shows this card while
   keepsake-loader.js verifies the session and swaps in the private page.
   Tokens come from tokens.css.
   ============================================================================= */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, var(--room) 0%, var(--void) 65%),
    var(--void);
  color: var(--text);
  font-family: var(--f-crt);
}
::selection { background: var(--cyan); color: var(--void); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* CRT scanlines: pure decoration, removed under prefers-contrast. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
}
@media (prefers-contrast: more) { body::after { display: none; } }

.hidden { display: none !important; }

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gate-card {
  position: relative;
  background: var(--screen);
  border: 2px dashed var(--px-line);
  box-shadow: 0 0 40px var(--cyan-tint-10);
  padding: 30px 26px;
  max-width: 420px; width: 100%;
  text-align: center;
}
/* Lit ticks at all four corners, matching .crt-frame in the app shell. */
.gate-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--px-line), var(--px-line)),
    linear-gradient(var(--px-line), var(--px-line)),
    linear-gradient(var(--px-line), var(--px-line)),
    linear-gradient(var(--px-line), var(--px-line));
  background-size: 6px 6px;
  background-repeat: no-repeat;
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
}
.gate-title {
  font-family: var(--f-px);
  font-size: 12px;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--px-line);
  overflow-wrap: anywhere;
}
.gate-status-row { margin: 14px 0 0; min-height: 24px; }
.gate-status { font-size: 19px; color: var(--text-mute); }
.gate-cursor {
  display: inline-block;
  color: var(--cyan);
  animation: gate-blink 0.9s steps(1, end) infinite;
}
@keyframes gate-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gate-cursor { animation: none; } }

.gate-error-msg {
  color: var(--red);
  font-size: 19px;
  line-height: 1.4;
  margin: 12px 0 18px;
  overflow-wrap: anywhere;
}
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate-btn {
  display: inline-block;
  font-family: var(--f-px);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 12px 16px;
  background: var(--cyan);
  color: var(--void);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease;
}
.gate-btn:hover { background: var(--cyan-hi); border-color: var(--cyan-hi); }
.gate-btn:active { transform: translate(1px, 1px); }
.gate-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (pointer: coarse) {
  .gate-btn { padding: 14px 18px; min-height: 44px; }
}
