/* Student pages (Mitmachen, names, practice link, example) in the style of Umfrage's student page:
   white, one column, logo top left, large code field, pill buttons, answer-like name cards.
   The playing field itself comes from the game (templates/<id>/style.css). */
body.student {
  --ink: #15182c; --muted: #65697d; --line: #e4e6ef; --surface: #ffffff; --page: #f4f5f9;
  --accent: #5b5bf6; --accent-dark: #4141d6; --accent-soft: #ececfe; --accent-ink: #2f2fb0;
  --good: #10a37f; --good-soft: #e2f6f0; --bad: #c93643; --bad-soft: #fdeced;
  min-height: 100vh; min-height: 100dvh; background: #fff; overscroll-behavior-y: none;
  font: 17px/1.5 "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
body.student *, body.student *::before, body.student *::after { box-sizing: border-box; }
.student-app { display: flex; flex-direction: column; max-width: 560px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); }
.student-app.is-wide { max-width: 800px; }
.student-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.teacher-login { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.teacher-login:hover { color: var(--ink); }
.who { max-width: 60%; overflow: hidden; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.student-main { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.student-title { margin: 0; font-size: clamp(24px, 6.5vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }

.student .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.student .button.primary { border-color: transparent; background: var(--accent); color: #fff; }
.student .button.primary:hover { background: var(--accent-dark); }
.student .button.block { width: 100%; }
.student .button:disabled { opacity: .45; cursor: not-allowed; }
.student .button.example-back { flex: none; min-height: 44px; padding-inline: 14px; font-size: 14px; font-weight: 650; }
.example-back svg { flex: none; width: 18px; height: 18px; }
.student :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* Code entry. */
.join-form { display: grid; gap: 16px; margin: auto 0; text-align: center; }
.join-form h1 { margin: 0; font-size: 30px; font-weight: 800; }
.code-input { width: 100%; min-height: 72px; padding: 0 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink);
  font: inherit; font-size: 36px; font-weight: 800; letter-spacing: .12em; text-align: center; }
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.code-input[aria-invalid="true"] { border-color: var(--bad); }
.form-message { min-height: 1.5em; margin: 0; font-size: 14px; color: var(--muted); }
.form-message.error { color: var(--bad); font-weight: 600; }

/* Names as large option cards (like Umfrage's answers). */
.name-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.name-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; padding: 12px 16px 12px 22px;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); font: inherit; font-size: 18px; font-weight: 650; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.name-option::before { content: ""; position: absolute; left: -2px; top: -2px; bottom: -2px; width: 8px; border-radius: 16px 0 0 16px; background: var(--accent); }
.name-option:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.name-option:disabled { cursor: not-allowed; color: var(--muted); background: var(--page); }
.name-option:disabled::before { background: #c9ccda; }
.name-option small { flex: none; font-size: 14px; font-weight: 600; }
.join-hint { font-size: 14px; color: var(--muted); }
.join-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: #9b1c26; font-weight: 600; }

/* Centered messages: confirm, ended, signed out. */
.center-screen { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px 0; text-align: center; }
.center-screen h1 { margin: 0; font-size: 28px; font-weight: 800; overflow-wrap: anywhere; }
.center-screen p { margin: 0; color: var(--muted); }
.center-screen .button { width: min(320px, 100%); }
.big-mark { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.big-mark svg { width: 44px; height: 44px; }
.big-mark.ok { background: var(--good-soft); color: var(--good); }
.join-offline { margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff5dd; color: #5c4300; font-size: 15px; }
