/* ============================================================================
   STARFALL — THE LOCK-DOWN NOTICE
   css/guard.css
   ----------------------------------------------------------------------------
   One screen, drawn over the whole page by js/guard.js, and one line of text it
   exists to carry: hacking this site is forbidden.

   It is deliberately its own file rather than a block inside another sheet:

     - every page loads it (the desk, the terminal, the cashier, the checkout,
       the auth screens, the error pages), so the notice looks identical
       wherever a reader meets it;
     - it contacts nothing. No webfont, no image, no request of any kind. A page
       that has just been flagged is the last page that should be waiting on a
       network round trip to explain itself;
     - it defines its own tokens. It must not inherit a --faint or an --accent
       from a page's own stylesheet: on the pages where this file matters most
       there may be no other stylesheet at all.

   Nothing here is hidden behind a class a page has to opt into. `html.sf-locked`
   is set by the guard at the moment it fires, and everything below hangs off
   that one selector, so the styles cannot drift out of sync with the script.
   ========================================================================== */

html.sf-locked {
  --sf-bg: #05070b;
  --sf-ink: #e9effb;
  --sf-ink-2: #b6c3d8;
  --sf-muted: #7c8ba5;
  --sf-line: rgba(255, 255, 255, 0.10);
  --sf-warn: #ff5d73;
  --sf-warn-rgb: 255, 93, 115;
  --sf-gold: #ffbb00;
  --sf-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sf-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* The page underneath stops moving and stops being reachable. `inert` is set on
   every sibling by the script; this is the belt to that brace for browsers that
   do not implement it, and it is also what kills the scrollbar. */
html.sf-locked,
html.sf-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
  touch-action: none;
}

/* ----------------------------------------------------------------------------
   THE FIRST REFUSAL · the rule, said once, without freezing the page
   ----------------------------------------------------------------------------
   The lock is for the second attempt. The first one is answered with this strip
   instead: a refusal nobody can see teaches nothing, and a page that silently
   ignores a key looks broken. It passes the pointer straight through, sits
   under the lock's own layer, and never blocks a control a reader needs. */
.sf-guard-note {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483400;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(640px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid rgba(255, 93, 115, 0.55);
  border-left: 3px solid #ff5d73;
  border-radius: 9px;
  background: rgba(12, 6, 9, 0.95);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.95);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.sf-guard-note.is-on { opacity: 1; transform: translate(-50%, 0); }
.sf-guard-note b { color: #ff8a9b; font-weight: 700; }
.sf-guard-note span { color: #b6c3d8; }

.sf-guard {
  position: fixed;
  inset: 0;
  z-index: 2147483600;            /* above every toast, modal and toolbar */
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(var(--sf-warn-rgb), 0.16), transparent 62%),
    var(--sf-bg);
  color: var(--sf-ink);
  font-family: var(--sf-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  animation: sfGuardIn 0.18s ease-out both;
  cursor: default;
}

@keyframes sfGuardIn { from { opacity: 0; } to { opacity: 1; } }

.sf-guard__card {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--sf-line);
  border-top: 3px solid var(--sf-warn);
  border-radius: 10px;
  background: #080b11;
  padding: 26px 26px 22px;
  box-shadow: 0 30px 90px -40px rgba(0, 0, 0, 0.95);
}

.sf-guard__kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font: 700 10px/1 var(--sf-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sf-warn);
}

.sf-guard__kicker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sf-warn);
  box-shadow: 0 0 0 4px rgba(var(--sf-warn-rgb), 0.18);
  animation: sfGuardPulse 1.4s ease-in-out infinite;
}

@keyframes sfGuardPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.sf-guard__title {
  margin: 0 0 4px;
  font: 800 26px/1.15 var(--sf-mono);
  letter-spacing: -0.01em;
  color: var(--sf-ink);
  text-transform: uppercase;
}

.sf-guard__title em {
  font-style: normal;
  color: var(--sf-warn);
}

.sf-guard__lead {
  margin: 12px 0 0;
  color: var(--sf-ink-2);
  max-width: 46ch;
}

.sf-guard__lead b { color: var(--sf-ink); }

.sf-guard__rules {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--sf-line);
}

.sf-guard__rules li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--sf-line);
  font: 600 12px/1.5 var(--sf-mono);
  color: var(--sf-muted);
}

.sf-guard__rules li b { color: var(--sf-gold); flex: none; }

.sf-guard__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  font: 600 10px/1.6 var(--sf-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sf-muted);
}

.sf-guard__foot b { color: var(--sf-ink-2); }

/* The one thing the locked page will not do is be selected, dragged or copied:
   a notice that can be screenshotted is fine, a page that can be lifted out of
   its own lock is not. */
.sf-guard,
.sf-guard * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@media (max-width: 520px) {
  .sf-guard { padding: 14px; }
  .sf-guard__card { padding: 20px 18px 18px; }
  .sf-guard__title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-guard { animation: none; }
  .sf-guard__kicker i { animation: none; }
}

/* The dev badge used to live here: a fixed chip in the corner for as long as
   dev mode was on (see DEV MODE in js/guard.js). It is gone — dev mode is
   announced on the console now, where the only person who can be in it is
   already looking. Nothing else in this file changed with it: the notice, the
   key strip and the lock are the same rules they were. */
