:root {
  --ink: #16352e;
  --muted: #3e5c54;
  --paper: #eef8f3;
  --card: #fffefb;
  --line: #c5e4da;
  --forest: #1a6b5a;
  --forest-2: #7ed9c4;
  --gold: #f2d15c;
  --gold-soft: rgba(242, 209, 92, 0.35);
  --plus: #c45b8a;
  --plus-soft: #f8e4ee;
  --minus: #4f739c;
  --minus-soft: #e6eef6;
  --shadow: 0 12px 28px rgba(80, 160, 140, 0.1);
  --radius: 18px;
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 500;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(92% 32% at 50% 34%, rgba(246, 226, 112, 0.85), transparent 70%),
    radial-gradient(58% 32% at 10% 112%, #ff8ec4 0%, rgba(255, 142, 196, 0.05) 55%),
    radial-gradient(58% 32% at 90% 112%, #c9a4ff 0%, rgba(201, 164, 255, 0.05) 55%),
    linear-gradient(180deg, #c8f3e6 0%, #d9f4ea 24%, #f4eda0 46%, #f7d4e6 76%, #d4b6f2 100%);
  color: var(--ink);
  font-weight: 500;
  overscroll-behavior-x: none;
}
html { -webkit-text-size-adjust: 100%; }
html[lang="de"] { hyphens: auto; }
button, input, textarea, select { font: inherit; font-weight: 500; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #4e6860; opacity: 1; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.app {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  background:
    radial-gradient(280px 140px at 12% 0%, rgba(255, 248, 214, 0.9), transparent 58%),
    linear-gradient(165deg, #c8f3e6, #9ee8d4 42%, #f7e79a);
  color: var(--ink);
  padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(242, 209, 92, 0.45), 0 10px 24px rgba(90, 180, 160, 0.12);
}
.top.compact {
  padding: calc(6px + env(safe-area-inset-top)) 12px 8px;
}
.top h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.top h1.brand-title {
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.05;
}
.brand-title .brand-aura { font-weight: 750; }
.top.compact h1 {
  font-size: 1.05rem;
  line-height: 1.2;
}
.top.compact h1.brand-title {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.top h1.letter-title,
.top.compact h1.letter-title {
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
}
.top p {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-size: 1.08rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.top.compact .top-row { gap: 8px; }
.top-text { flex: 1 1 9.5rem; min-width: 9.5rem; }
.top-text h1 { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.back {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: inherit;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}
.back.slim, .btn.slim {
  padding: 5px 10px;
  font-size: 0.78rem;
}
.brand-wrap {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
}
.top.compact .brand-wrap {
  width: 50px;
  height: 50px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 22.5%;
  display: block;
  box-shadow: 0 3px 12px rgba(190, 120, 210, 0.35);
  animation: aura-pulse 3.4s ease-in-out infinite;
}
.top.compact .brand-mark {
  width: 44px;
  height: 44px;
}
@keyframes aura-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark { animation: none; }
}

.nav {
  display: flex;
  gap: 4px;
  margin: 14px 0 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
}
.top.compact .nav {
  margin: 6px 0 0;
  padding: 2px;
}
.nav a, .chip-btn {
  text-decoration: none;
  flex: 1;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}
.nav a {
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
}
.top.compact .nav a {
  padding: 5px 10px;
  font-size: 0.98rem;
}
.nav a.active {
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(90, 180, 160, 0.12);
}
.product-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
}
.product-switch a {
  flex: 1 1 140px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 12px;
  line-height: 1.25;
}
.product-switch a.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(40, 80, 70, 0.12);
}
.product-switch a.active.family {
  background: #fff6d8;
}

main {
  padding: 16px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  flex: 1;
  min-width: 0;
}
.app:not(.site) main { padding-top: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 10px; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); font-weight: 650; }
.sync-card h2 { text-transform: none; letter-spacing: 0; font-size: 0.98rem; line-height: 1.35; }
.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: #f8f6f2;
  border: 1px solid #efe8e2;
  border-radius: 14px;
}
.account-bar > div { flex: 1 1 140px; min-width: 0; }
.account-bar strong { display: block; font-size: 0.92rem; overflow-wrap: anywhere; }
.account-bar span { display: block; color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.account-bar .btn { flex-shrink: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sync-card.on { border-color: #bfe8d9; background: #f3fffa; }
.sync-card.off { border-color: #f0c8c3; background: #fff8f7; }

.muted { color: var(--muted); font-size: 1rem; font-weight: 500; line-height: 1.45; }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.btn {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  background: #efe6f6;
  box-shadow: none;
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #eadff0;
  box-shadow: none;
}
.btn.danger { background: #f6e4ee; color: var(--ink); box-shadow: none; }
.btn.plus { background: #e4f3ec; color: var(--ink); }
.btn.minus { background: #f6e4ee; color: var(--ink); }
.btn.filter-tab {
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
}
.btn.filter-tab.tone-mint,
.btn.filter-tab.tone-gold,
.btn.filter-tab.tone-peach,
.btn.filter-tab.tone-pink,
.btn.filter-tab.tone-lilac,
.btn.filter-tab.tone-sky,
.btn.filter-tab.is-on {
  box-shadow: none;
}
.btn.filter-tab.tone-mint { background: #e4f4ec; }
.btn.filter-tab.tone-gold { background: #f4efd8; }
.btn.filter-tab.tone-peach { background: #f8ebe3; }
.btn.filter-tab.tone-pink { background: #f8e6ef; }
.btn.filter-tab.tone-lilac { background: #efe6f8; }
.btn.filter-tab.tone-sky { background: #e6f4f6; }
.btn.filter-tab.is-on { border-color: rgba(22, 53, 46, 0.16); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  max-width: 100%;
}

.class-grid { display: grid; gap: 12px; margin-top: 4px; }
.class-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  padding: 16px 16px;
  border-radius: 16px;
  background: #f6f3ee;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: none;
  position: relative;
}
.class-tile.tone-mint { background: #e7f3ec; }
.class-tile.tone-sand { background: #f3efe6; }
.class-tile.tone-peach { background: #f6eee8; }
.class-tile.tone-rose { background: #f6eaf0; }
.class-tile.tone-lilac { background: #efeaf6; }
.class-tile.tone-sky { background: #e7f2f4; }
.class-tile strong { display: block; font-size: 1.2rem; font-weight: 650; }
.class-tile span { color: var(--muted); font-size: 0.92rem; }
.class-tile span.aura-pill { color: var(--plus); }
.class-tile span.aura-pill.neg { color: var(--minus); }
.class-tile span.aura-pill.zero { color: var(--muted); }
.fold {
  background: rgba(255, 254, 251, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  margin-bottom: 10px;
}
.fold summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}
.fold[open] summary::before { transform: rotate(45deg) translateY(-2px); }
.fold-body { padding: 0 16px 14px; }
.aura-pill {
  min-width: 52px;
  text-align: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 650;
  background: var(--plus-soft);
  color: var(--plus);
  font-variant-numeric: tabular-nums;
}
.aura-pill.neg { background: var(--minus-soft); color: var(--minus); }
.aura-pill.zero { background: #eef3ef; color: var(--muted); }

.lang-switch {
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 3px;
}
.top.compact .lang-switch { padding: 2px; }
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}
.top.compact .lang-switch button { padding: 4px 8px; font-size: 0.72rem; }
.lang-switch button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(90, 180, 160, 0.16);
}

.swipe-howto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.howto {
  border-radius: 14px;
  padding: 8px 10px;
  display: grid;
  gap: 1px;
  text-align: center;
  border: 1px solid var(--line);
}
.howto.minus { background: var(--minus-soft); border-color: #c5d6ea; }
.howto.plus { background: var(--plus-soft); border-color: #f0c9db; }
.howto-arrow { font-size: 1.35rem; font-weight: 650; line-height: 1; }
.howto.minus .howto-arrow { color: var(--minus); }
.howto.plus .howto-arrow { color: var(--plus); }
.howto strong { font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.howto span:last-child { font-size: 0.95rem; font-weight: 500; color: var(--ink); }

.lang-pick { display: grid; gap: 10px; margin-top: 16px; }
.lang-pick-btn { width: 100%; text-align: center; font-size: 1.05rem; padding: 14px; }

.legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--ink);
}
.legend .minus { color: var(--minus); }
.legend .plus { color: var(--plus); }
.legend .mid { color: var(--ink); font-weight: 650; letter-spacing: 0.06em; font-size: 0.82rem; }

.swipe-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.swipe-list { display: grid; }

.swipe-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--plus) 0 72px, #ddd 72px calc(100% - 72px), var(--minus) calc(100% - 72px) 100%);
  touch-action: pan-y;
}
.swipe-wrap + .swipe-wrap { border-top: 1px solid var(--line); }
.swipe-wrap.swiping { touch-action: none; }
.swipe-bg {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.88rem;
}
.swipe-bg .left, .swipe-bg .right { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.15); }
.swipe-wrap.plus-ready { background: var(--plus); }
.swipe-wrap.minus-ready { background: var(--minus); }

.student-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  padding: 13px 14px;
  min-height: 68px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.card > .student-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: hsl(var(--av, 152) 32% 88%);
  color: hsl(var(--av, 152) 28% 24%);
  font-weight: 650;
  font-size: 0.82rem;
  box-shadow: inset 0 0 0 1px hsl(var(--av, 152) 20% 78%);
}
.student-row h3 { margin: 0; font-size: 1.08rem; font-weight: 650; }
.student-row p { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(70, 130, 118, 0.28);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.sheet {
  width: min(760px, 100%);
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(28px + env(safe-area-inset-bottom));
  max-height: 82dvh;
  overflow: auto;
  box-shadow: 0 -16px 40px rgba(0,0,0,0.18);
}
.sheet.plus { border-top: 3px solid var(--plus); }
.sheet.minus { border-top: 3px solid var(--minus); }
.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #d8d0c2;
  margin: 4px auto 12px;
}
.sheet h2 { margin: 0 0 4px; font-size: 1.2rem; }

.class-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.class-tools .btn { text-align: center; width: 100%; }
.class-tools .btn[data-class-aura],
.class-tools .btn[data-multi-aura] {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
}
.class-tools .btn[data-class-aura] { background: #efe6f8; }
.class-tools .btn[data-multi-aura] { background: #f8ebe3; }
#new-class .btn {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
  background: #e7f2ec;
}

.dial {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 10px;
  align-items: center;
  margin: 14px 0 8px;
}
.dial-value {
  text-align: center;
  background: var(--plus-soft);
  border: 1px solid #f0c9db;
  border-radius: 18px;
  padding: 10px 8px;
}
.dial-value strong {
  display: block;
  font-size: 2rem;
  font-weight: 650;
  color: var(--plus);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.dial-value span { color: var(--muted); font-size: 0.78rem; }
.dial-range {
  width: 100%;
  accent-color: var(--plus);
  height: 28px;
  margin-bottom: 12px;
}
.reason-group { margin-top: 16px; }
.reason-group h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
}
.reasons { display: grid; gap: 8px; margin-top: 0; }
.area-split { margin-top: 8px; }
.reason {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  min-height: 48px;
}
.reason.plus { border-left: 4px solid var(--plus); }
.reason.minus { border-left: 4px solid var(--minus); }
.reason.plus:hover, .reason.plus:active { border-color: var(--plus); background: var(--plus-soft); }
.reason.minus:hover, .reason.minus:active { border-color: var(--minus); background: var(--minus-soft); }

.steps { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink); font-size: 1rem; }
.steps li { margin: 6px 0; }
.phone-url {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  background: #e7efe9;
  border-radius: 10px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.warn { color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--plus);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  z-index: 50;
  animation: pop 2.4s ease forwards;
  box-shadow: 0 10px 24px rgba(180, 100, 140, 0.22);
  max-width: calc(100vw - 32px);
}
.toast.minus { background: var(--minus); }
@keyframes pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  opacity: 0;
}
.flash.plus { background: radial-gradient(circle at center, rgba(232, 160, 190, 0.35), transparent 55%); animation: flash 700ms ease; }
.flash.minus { background: radial-gradient(circle at center, rgba(140, 170, 210, 0.32), transparent 55%); animation: flash 500ms ease; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.delta { font-weight: 650; font-variant-numeric: tabular-nums; }
.delta.plus { color: var(--plus); }
.delta.minus { color: var(--minus); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 42%) 1fr auto; gap: 8px; align-items: center; }
.bar-label { font-size: 0.95rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.bar-track { height: 9px; background: #e7f3ee; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: #bbb; }
.bar-fill.plus { background: #e7b4cc; }
.bar-fill.minus { background: #c5d6ea; }
.bar-value { font-size: 0.95rem; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar-value.plus { color: var(--plus); }
.bar-value.minus { color: var(--minus); }

.spark { width: 100%; height: 72px; display: block; }

.linkish { background: none; border: 0; color: #c45b8a; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

.edit-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.lead { font-size: 1.08rem; font-weight: 400; line-height: 1.45; margin: 0 0 12px; }
.form-error { color: #8d2e28; font-weight: 600; margin: 8px 0; }
.form-ok { color: var(--forest); font-weight: 600; margin: 0 0 12px; }
.hero-card .steps { color: var(--ink); }

.site.gate main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.login-window {
  width: 100%;
  max-width: 420px;
  margin: 8px auto 0;
  padding: 18px 16px 16px;
}
.login-window h2 {
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.login-window .btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px;
  font-size: 1.05rem;
}
#login-form .btn,
#student-login-form .btn,
#register-form .btn,
#setup-form .btn {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
}
#login-form .btn,
#student-login-form .btn { background: #efe6f8; }
#register-form .btn { background: #f8ebe3; }
#setup-form .btn { background: #f8e6ef; }
.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  background: #eef6f2;
  border-radius: 16px;
}
.role-tabs button,
.role-tabs a {
  flex: 1 1 6.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
}
.role-tabs button.active,
.role-tabs a.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(40, 80, 70, 0.12);
}
.staff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.staff-row strong { overflow-wrap: anywhere; }
.staff-row:last-of-type { border-bottom: 0; }
.btn.slim { width: auto; padding: 8px 12px; margin: 0; }
.student-score {
  text-align: center;
  padding: 8px 0 4px;
}
.student-score .big {
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.student-score .split {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}
.site-switch {
  text-align: center;
  margin: 16px 0 0;
}
.site-switch a {
  color: #c45b8a;
  font-weight: 400;
}

@media (max-width: 430px) {
  .login-window h2 { font-size: 1.18rem; }
  .top h1 { font-size: 1.15rem; }
  .top h1.brand-title { font-size: 1.55rem; letter-spacing: 0.04em; }
  .top.compact h1.brand-title { font-size: 1.2rem; }
  .top p { font-size: 0.88rem; letter-spacing: 0.09em; }
  .product-switch a { font-size: 0.82rem; letter-spacing: 0.1em; }
  .nav a, .top.compact .nav a, .btn.filter-tab { font-size: 0.82rem; letter-spacing: 0.1em; }
  .top h1.letter-title, .top.compact h1.letter-title { font-size: 1.15rem; letter-spacing: 0.06em; }
}

@media (min-width: 720px) {
  .class-grid { grid-template-columns: 1fr 1fr; }
  .reasons { grid-template-columns: 1fr 1fr; }
}
