@font-face { font-family: 'Elza'; src: url('/fonts/Elza-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Elza'; src: url('/fonts/Elza-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Elza'; src: url('/fonts/Elza-Semibold.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }

/* ManageXR brand palette (from the web console theme). */
:root {
  --bg: #191B2E;
  --bg2: #2F3257;
  --navy: #222753;
  --ink: #191B2E;
  --light: #F7F6FE;
  --soft: #B3B3E5;
  --muted: #7070B2;
  --orange: #FF7644;
  --orange-dark: #E15720;
  --purple: #5840D2;
  --purple-light: #7761E5;
  --lavender: #E0D5F6;
  --good: #197A39;
  --bad: #CB4545;
  --c0: #FF7644;
  --c1: #5840D2;
  --c2: #3B6BCB;
  --c3: #197A39;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Elza', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  background:
    radial-gradient(ellipse at 15% -10%, rgba(88, 64, 210, .45), transparent 55%),
    radial-gradient(ellipse at 110% 110%, rgba(255, 118, 68, .18), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--light);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 1.1rem;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 0 var(--orange-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: rgba(255, 255, 255, .1); color: var(--light); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .16); }

.logo { display: block; height: 34px; width: auto; }
.mark { display: block; height: 26px; width: auto; }

.c0 { background: var(--c0); }
.c1 { background: var(--c1); }
.c2 { background: var(--c2); }
.c3 { background: var(--c3); }

.shape::before { display: inline-block; width: 1.4em; text-align: center; }
.shape.s0::before { content: '▲'; }
.shape.s1::before { content: '◆'; }
.shape.s2::before { content: '●'; }
.shape.s3::before { content: '■'; }

.spinner {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, .15);
  border-top-color: var(--orange);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
.pop { animation: pop .4s ease-out both; }

.offline-banner {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 50;
  background: var(--bad); color: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

.recap-list { display: flex; flex-direction: column; gap: 14px; }
.recap-q { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 16px 18px; }
.recap-q h3 { margin: 0 0 4px; font-size: 1.15rem; }
.recap-q .correct-line { color: #8BE4AA; margin-bottom: 10px; }
.recap-row { display: grid; grid-template-columns: 1.5em minmax(90px, 1fr) 2fr auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.recap-row .ok { color: #8BE4AA; }
.recap-row .no { color: #EB6969; }
.recap-row .who { font-weight: 600; }
.recap-row .said { color: var(--soft); overflow-wrap: anywhere; }
.recap-row .pts { font-variant-numeric: tabular-nums; color: var(--light); }

/* Host key form. It is plain HTML on the host and editor pages, shown only when no key is saved. */
.key-gate { display: none; }
body.need-key > :not(.key-gate):not(script) { display: none !important; }
body.need-key .key-gate {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  width: min(380px, calc(100% - 32px)); margin: 12vh auto 0; text-align: center;
}
.key-gate .logo { height: 56px; align-self: center; }
.key-gate h1 { margin: 6px 0 0; font-size: 1.8rem; }
.key-gate p { margin: 0; color: var(--soft); }
.key-gate .key-error { color: #FFB4A0; }
.key-gate input {
  padding: 14px 16px; border-radius: 12px; border: 3px solid transparent;
  font-size: 1.2rem; text-align: center; background: #fff; color: var(--ink);
}
.key-gate input:focus { outline: none; border-color: var(--orange); }
body.need-key { display: block !important; }
