@import url("xtart.css");

body.app {
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
}
body.app[data-theme="dark"] { background: var(--ink); color: #fff; }
.phone {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1.15rem max(1.3rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 1.4rem;
}
.app-top a { color: inherit; text-decoration: none; font-weight: 650; }
.screen { display: flex; flex: 1; flex-direction: column; }
.screen h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.4rem, 11vw, 3.5rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-transform: uppercase;
}
.lead { color: inherit; opacity: 0.72; line-height: 1.45; }
.hero-icon {
  display: grid;
  width: 5.2rem;
  height: 5.2rem;
  margin: 1.4rem auto 1.2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 2rem;
}
.avatar {
  width: 4.4rem;
  height: 4.4rem;
  margin: 0.4rem auto 0.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
}
.scan-hero {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 280px;
  border-radius: 28px;
  background: #111;
}
#camera-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute;
  inset: 18%;
  border: 3px solid var(--lime);
  border-radius: 28px;
  pointer-events: none;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: 1.2rem;
}
.camera-placeholder p { max-width: 18rem; margin: 0; line-height: 1.35; }
.counter {
  margin: 1rem 0 0.4rem;
  text-align: center;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.progress { display: none; }
.notice {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--mist);
}
.notice--warning { background: #ffe8e6; color: #9b1c1c; }
.camera-panel, .results { margin-top: 0.4rem; }
.results { text-align: center; }
.success-mark {
  display: grid;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0.4rem auto 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  font-size: 1.8rem;
  font-weight: 900;
}
.status { min-height: 2.4rem; margin: 0.7rem 0; color: var(--muted); }
.status--error { color: var(--danger); }
.button, .xt-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button--primary, body[data-theme="dark"] .button--primary { background: var(--lime); color: var(--ink); }
.button:disabled { opacity: 0.45; }
.board-link { display: inline-block; margin-top: 1rem; text-align: center; color: inherit; opacity: 0.7; }
.results__list { display: grid; gap: 0.6rem; margin: 0 0 1rem; padding: 0; list-style: none; text-align: left; }
.results__list li { padding: 0.8rem; border-radius: 14px; background: var(--mist); }
.result__value { display: block; font-size: 0.86rem; }
.result__time { color: var(--muted); font-size: 0.72rem; }
.camera-shell { position: relative; width: 100%; min-height: 280px; overflow: hidden; border-radius: 28px; background: #111; isolation: isolate; }
.camera-shell--detected { outline: 3px solid var(--lime); }
.eyebrow { margin: 0 0 0.4rem; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; font-weight: 750; color: var(--muted); }
.noscript { margin: 0; padding: 1rem; color: #fff; background: var(--danger); text-align: center; }
[hidden] { display: none !important; }

.student-app { background: #0b0b0b; color: #fff; }
.student-app[data-theme="light"] { background: #fff; color: var(--ink); }
.student-app .phone { width: min(100%, 460px); padding: 0; background: transparent; }
.student-app .screen { display: none; min-height: 100vh; min-height: 100dvh; }
.student-app .screen:not([hidden]) { display: flex; }
.student-app .screen[hidden] { display: none !important; }
.mark-slash {
  display: inline-block;
  width: 0.22em;
  height: 0.72em;
  margin-left: 0.12em;
  background: var(--lime);
  transform: skewX(-18deg);
  vertical-align: -0.02em;
}
.welcome {
  position: relative;
  overflow: hidden;
  padding: max(2.4rem, env(safe-area-inset-top)) 1.35rem max(1.4rem, env(safe-area-inset-bottom));
  background: #0b0b0b;
}
.welcome__logo { display: grid; justify-items: center; gap: 0.15rem; margin: 1.6rem 0 2.4rem; text-align: center; }
.welcome__logo .xt-logo__mark { width: 2.4rem; height: 2.4rem; }
.welcome__logo strong { font-size: 1.7rem; letter-spacing: 0.12em; }
.welcome__logo span { color: #c8c8c4; font-size: 0.95rem; }
.welcome h1 {
  max-width: 11ch;
  font-size: clamp(3.1rem, 14vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.88;
}
.mark-slash--title { width: 0.16em; height: 0.78em; margin-left: 0.08em; }
.welcome .lead { max-width: 28ch; margin-top: 1.2rem; color: #b7b7b4; font-size: 1.05rem; opacity: 1; }
.welcome__art {
  position: absolute;
  right: -30%;
  bottom: -6%;
  width: 150%;
  height: 46%;
  background:
    linear-gradient(118deg, transparent 0 34%, rgba(214, 255, 42, 0.95) 34% 48%, transparent 48%),
    linear-gradient(132deg, transparent 0 46%, rgba(158, 196, 0, 0.85) 46% 62%, transparent 62%),
    linear-gradient(148deg, transparent 0 58%, rgba(214, 255, 42, 0.55) 58% 70%, transparent 70%);
  pointer-events: none;
}
.welcome .button, .welcome .status { position: relative; z-index: 1; }
.welcome .button { margin-top: auto; gap: 0.7rem; font-size: 1rem; letter-spacing: 0.04em; }
.welcome .status { min-height: 1.4rem; text-align: center; }

.scan { position: relative; color: #fff; background: #050505; }
.scan__top, .scan-banner, .detect-card, .scan-status, .scan__retry { position: relative; z-index: 2; }
.scan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(0.8rem, env(safe-area-inset-top)) 1rem 0.4rem;
}
.scan__back {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.scan .xt-logo { color: #fff; }
.scan .xt-logo__text span, .scan .xt-logo__text strong { color: #fff; }
.scan-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 0.7rem auto 0;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 750;
}
.student-app .scan .camera-shell {
  position: absolute;
  inset: 0;
  min-height: 100%;
  border-radius: 0;
  z-index: 0;
}
.student-app .scan-frame { inset: 18% 14% 30%; border: 0; border-radius: 0; }
.student-app .scan-frame span {
  position: absolute;
  width: 2.6rem;
  height: 2.6rem;
  border: 6px solid var(--lime);
}
.student-app .scan-frame span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.student-app .scan-frame span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.student-app .scan-frame span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.student-app .scan-frame span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.detect-card {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  padding: 1rem 1rem 0.8rem;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.scan.scan--direct .scan-banner,
.scan.scan--direct .detect-card { display: none; }
.scan.scan--direct .scan-status { bottom: max(1rem, env(safe-area-inset-bottom)); }
.scan.scan--direct .scan__retry { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
.detect-card span { display: block; color: #8a8a86; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.08em; }
.detect-card strong { display: block; margin-top: 0.15rem; font-size: 3.4rem; letter-spacing: -0.06em; line-height: 1; }
.scan-status {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: calc(7.2rem + env(safe-area-inset-bottom));
  margin: 0;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.scan__retry { position: absolute; left: 1rem; right: 1rem; bottom: calc(8.6rem + env(safe-area-inset-bottom)); width: auto; }

.confirm {
  padding: max(1.4rem, env(safe-area-inset-top)) 1.25rem max(1.2rem, env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ink);
  text-align: center;
}
.confirm__logo { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: 0.4rem 0 1.2rem; letter-spacing: 0.14em; }
.confirm__hero { position: relative; width: 9rem; height: 7.2rem; margin: 0 auto 0.4rem; }
.confirm__hero::before, .confirm__hero::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--lime);
  transform: rotate(18deg);
}
.confirm__hero::before { top: 0.8rem; left: 0.2rem; box-shadow: 2.2rem -0.4rem 0 var(--lime), 4.4rem 1.2rem 0 #d6ff2a; }
.confirm__hero::after { right: 0.4rem; bottom: 1rem; box-shadow: -1.6rem 0.8rem 0 var(--lime), -3.2rem -1rem 0 #e7ff7a; }
.confirm .success-mark {
  position: absolute;
  inset: 0.8rem auto auto 50%;
  width: 5.4rem;
  height: 5.4rem;
  margin: 0;
  transform: translateX(-50%);
  background: #18b26b;
  color: #fff;
  font-size: 2.4rem;
  box-shadow: 0 0 0 0.7rem rgba(24, 178, 107, 0.16);
}
.confirm h2 { margin: 0.2rem 0 0.45rem; font-size: clamp(1.8rem, 8vw, 2.3rem); letter-spacing: -0.04em; line-height: 0.95; text-transform: uppercase; }
.confirm #validation-result { margin: 0 auto 1rem; max-width: 26ch; color: #667085; }
.confirm-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
}
.confirm-card .avatar { width: 3.4rem; height: 3.4rem; margin: 0; background: #ecece8; color: var(--ink); font-size: 1.2rem; }
.confirm-card strong { display: block; font-size: 1.02rem; }
.confirm-card p { margin: 0.15rem 0 0; color: #667085; font-size: 0.92rem; }
.confirm-meta { margin: 0.35rem 0; color: #344054; font-weight: 650; text-align: left; }
.confirm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.6rem auto 1.2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e8f8ef;
  color: #067647;
  font-weight: 750;
}
.confirm-badge::before { content: "✓"; }
.confirm .button { margin-top: auto; background: var(--ink); color: #fff; gap: 0.6rem; }
.confirm--error .success-mark { background: var(--danger); box-shadow: 0 0 0 0.7rem rgba(240, 68, 56, 0.16); }
.student-app #register-form { position: relative; z-index: 1; display: grid; gap: 0.85rem; margin: 1.1rem 0 0.4rem; }
.student-app #register-form label { display: grid; gap: 0.35rem; color: #fff; font-size: 0.95rem; font-weight: 700; }
.student-app #register-form span { color: #fff; }
.student-app #register-form input { min-height: 48px; padding: 0.65rem 0.8rem; border: 0; border-radius: 14px; background: #fff; color: #111; font: inherit; font-weight: 500; }
.student-app .notice { margin: 1.2rem; }
.student-app #identity-notice { padding: 1.4rem 1.2rem; }
