:root {
  --ink: #14112B;
  --violet: #5B3DF5;
  --violet-dark: #4A2FE0;
  --violet-soft: #ECE9FB;
  --violet-pale: #EDE9FE;
  --lime: #D4FF3A;
  --lime-ink: #3B3A1A;
  --muted: #5E5A78;
  --muted-2: #8C88A8;
  --on-dark: #C9C5E3;
  --on-dark-2: #D9D6EE;
  --ok: #1F8A4C;
  --ok-bg: #E8F6EE;
  --err: #B42318;
  --err-bg: #FDECEA;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  --bg: #F5F3FF;
  --surface: #FFFFFF;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(20, 17, 43, 0.04), 0 8px 24px rgba(20, 17, 43, 0.06);
  --font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.ea-body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ea-body a {
  color: var(--violet);
}

.ea-header {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ea-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.ea-body .ea-brand {
  color: var(--ink);
}

.ea-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 1rem;
}

.ea-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.ea-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ea-brand-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.ea-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ea-icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.ea-body .ea-icon-btn {
  color: var(--ink);
}

.ea-icon-btn:hover,
.ea-icon-btn:focus-visible {
  background: var(--violet-soft);
}

.ea-main {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 16px calc(28px + env(safe-area-inset-bottom));
  flex: 1;
}

.ea-hello {
  margin: 6px 0 20px;
  animation: eaRise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ea-hello h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -1.5px;
}

.ea-accent {
  display: block;
  color: var(--violet);
}

.ea-hello-sub {
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.ea-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  animation: eaRise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.06s both;
}

.ea-card + .ea-card {
  margin-top: 14px;
}

.ea-field {
  margin-bottom: 16px;
}

.ea-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.ea-input-wrap {
  position: relative;
}

.ea-input-wrap > i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 0.92rem;
  pointer-events: none;
}

.ea-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--violet-soft);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ea-input-wrap > .ea-input {
  padding-left: 42px;
}

.ea-input-wrap.has-toggle > .ea-input {
  padding-right: 52px;
}

.ea-input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.ea-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.12);
}

.ea-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ea-toggle:hover,
.ea-toggle:focus-visible {
  background: var(--violet-soft);
  color: var(--violet);
}

.ea-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.ea-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--violet);
  cursor: pointer;
}

.ea-btn {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--violet);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ea-btn:hover {
  background: var(--violet-dark);
}

.ea-btn:active {
  transform: scale(0.985);
}

.ea-btn:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.ea-btn-ghost {
  background: var(--violet-soft);
  color: var(--violet);
}

.ea-btn-ghost:hover {
  background: var(--violet-pale);
}

.ea-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: eaSpin 0.8s linear infinite;
}

.ea-spinner-lg {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 18px;
  border-width: 3.5px;
  border-color: var(--violet-soft);
  border-top-color: var(--violet);
}

.ea-links {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ea-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.ea-body .ea-link-row {
  color: var(--ink);
}

.ea-link-row > i:first-child {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.ea-link-row > span {
  flex: 1;
}

.ea-link-row > .ea-chev {
  color: var(--muted-2);
  font-size: 0.8rem;
}

.ea-link-row:hover {
  background: #FBFAFF;
}

.ea-link-row[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.7;
}

.ea-help {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.ea-help a {
  font-weight: 700;
}

.ea-support {
  display: none;
}

.ea-support:has(a[data-brand-support]:not([style*="none"])) {
  display: inline;
}

p.ea-support:has(a[data-brand-support]:not([style*="none"])) {
  display: block;
}

.ea-alert {
  display: none;
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.ea-alert.success,
.ea-alert.ok {
  display: block;
  background: var(--ok-bg);
  color: var(--ok);
}

.ea-alert.error,
.ea-alert.err {
  display: block;
  background: var(--err-bg);
  color: var(--err);
}

.ea-alert.warning {
  display: block;
  background: var(--warn-bg);
  color: var(--warn);
}

.ea-school-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px;
  overflow: auto;
}

.ea-body .school-opt {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 2px solid var(--violet-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ea-body .school-opt:hover,
.ea-body .school-opt:focus-visible {
  border-color: var(--violet);
  background: var(--violet-soft);
}

.ea-reqs {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg);
  list-style: none;
}

.ea-reqs-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ea-req {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.ea-req > i {
  width: 16px;
  text-align: center;
  font-size: 0.55rem;
  color: var(--muted-2);
}

.ea-req.valid,
.ea-req.ok {
  color: var(--ok);
}

.ea-req.valid > i,
.ea-req.ok > i {
  font-size: 0.9rem;
  color: var(--ok);
}

.ea-req.ok > i::before {
  content: "\f058";
}

.ea-shield {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.ea-center {
  text-align: center;
  padding: 28px 8px;
}

.ea-center h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.ea-center p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.ea-body [hidden] {
  display: none !important;
}

.ea-body .invite-notice {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--violet-soft);
  color: var(--ink);
}

.ea-body .invite-notice-error {
  background: var(--err-bg);
}

.ea-body .invite-notice-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.ea-body .invite-notice-text {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.ea-body .invite-notice-contact {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.ea-body .invite-notice-contact a {
  margin-left: 4px;
  font-weight: 800;
  color: var(--violet);
}

@keyframes eaRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes eaSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 360px) {
  .ea-hello h1 {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ea-hello,
  .ea-card {
    animation: none;
  }
  .ea-spinner {
    animation-duration: 2s;
  }
}
