.portal-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-theme-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem clamp(1.25rem, 4vw, 2rem);
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.portal-theme-home {
  font-family: var(--font-display, "Syne", sans-serif);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.portal-theme-home:hover {
  color: var(--accent);
}

.portal-theme-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portal-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}

.portal-card {
  width: 100%;
  max-width: 440px;
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg, 20px);
  border: 1px solid var(--border, #2a2228);
  background: color-mix(in srgb, var(--card, #140f13) 92%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.portal-card-wide {
  max-width: 520px;
}

.portal-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #f8b4ce);
  margin: 0 0 0.75rem;
}

.portal-title {
  font-family: var(--font-display, "Syne", sans-serif);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.portal-lede {
  margin: 0 0 1.5rem;
  color: var(--muted, #c4b0ba);
  font-size: 0.98rem;
  line-height: 1.55;
}

.portal-lede a {
  color: var(--accent, #f8b4ce);
}

.portal-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid color-mix(in srgb, var(--brand-a, #ff2a2a) 45%, var(--border));
  background: color-mix(in srgb, var(--brand-a, #ff2a2a) 12%, var(--card));
  color: var(--text, #fff);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.portal-alert code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg, #0e0a0d) 55%, transparent);
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portal-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #c4b0ba);
  margin-top: 0.5rem;
}

.portal-label-hint {
  font-weight: 400;
  opacity: 0.85;
}

.portal-label:first-of-type {
  margin-top: 0;
}

.portal-input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border, #2a2228);
  background: var(--bg-elevated, #120d11);
  color: var(--text, #fff);
  margin-bottom: 0.35rem;
  outline: none;
}

.portal-input:focus {
  border-color: var(--accent, #f8b4ce);
}

.portal-submit {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

.portal-foot {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted, #c4b0ba);
}

.portal-foot a {
  color: var(--accent, #f8b4ce);
}

.portal-foot--muted {
  font-size: 0.85rem;
  color: var(--muted, #c4b0ba);
  margin-top: 1rem;
}

.portal-pair-note {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted, #c4b0ba);
}

.portal-pair-note a {
  color: var(--accent, #f8b4ce);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.portal-download {
  margin: 1.5rem 0 0.5rem;
}

.portal-download .btn-large {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.portal-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.88rem;
  color: var(--muted, #c4b0ba);
  cursor: pointer;
  line-height: 1.4;
}

.portal-check input {
  margin-top: 0.2rem;
  accent-color: var(--accent, #f8b4ce);
}
