:root {
  --base-color: #1f4db8;
  --base-dark: #173b8d;
  --charcoal-blue: #12203a;
  --slate-blue: #172947;
  --chrome-light: #f8fbff;
  --solitude-blue: #edf3ff;
  --green: #2ebb79;
  --coral: #ff6b6b;
  --ink: #111827;
  --muted: #657184;
  --line: rgba(18, 32, 58, 0.12);
  --panel: rgba(255, 255, 255, 0.86);
  --shadow-soft: 0 18px 44px rgba(31, 77, 184, 0.14);
  --shadow-card: 0 28px 70px rgba(15, 23, 42, 0.16);
  --transition-smooth: 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Brillante Luna Piena";
  src: url("./src/fonts/brillante-luna-piena/BLunaPienaDemo.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 86px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(46, 187, 121, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 107, 0.16), transparent 24rem),
    linear-gradient(135deg, #f7f8fb 0%, #edf3ff 48%, #fff8f3 100%);
}

body.is-summary {
  padding-bottom: 0;
}

body.is-training {
  padding-bottom: 118px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 40px;
}

.setup-shell {
  min-height: 100vh;
  padding-top: 116px;
}

.topbar {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 48px;
}

.setup-shell .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 950;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

body.header-hidden .setup-shell .topbar {
  opacity: 0;
  transform: translateY(-112%);
}

.trainer-topbar {
  min-height: 124px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  padding: 24px 0 18px;
}

.trainer-topbar .icon-btn {
  justify-self: start;
  width: 72px;
  min-height: 48px;
  flex-basis: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 28px;
  line-height: 1;
}

.trainer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trainer-logo {
  width: 126px;
  height: 92px;
  display: block;
  object-fit: contain;
}

.trainer-topbar-spacer {
  justify-self: end;
  width: 72px;
  height: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 112px;
  height: 74px;
  display: block;
  object-fit: contain;
  transform: translate(-20px, -18px);
}

.brand-copy {
  position: relative;
  display: inline-block;
  padding-right: 120px;
  min-height: 66px;
  padding-top: 0;
  transform: translateX(-33px);
}

.brand strong,
.godeutsch-wordmark {
  display: block;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.godeutsch-wordmark {
  background: linear-gradient(90deg, #140607 0%, #140607 24%, #a00009 38%, #ef3e0b 68%, #f5bd00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.brand small {
  position: absolute;
  left: calc(100% - 137px);
  top: 23px;
  display: block;
  margin-top: 0;
  background: linear-gradient(135deg, #1f4db8, #2ebb79);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: "Brillante Luna Piena", cursive;
  font-size: 58px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand.compact strong {
  font-size: 34px;
}

.brand.compact .brand-logo {
  width: 76px;
  height: 50px;
}

.brand.compact small {
  left: calc(100% - 106px);
  top: 22px;
  font-size: 42px;
}

.brand.compact .brand-copy {
  min-height: 52px;
  padding-right: 92px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #2ebb79 58%, #ffb84d);
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(31, 77, 184, 0.22);
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  font-size: 26px;
}

.summary-brand {
  display: inline-flex;
  justify-content: center;
  margin: 0 auto 22px;
}

.topbar-meta,
.score-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.topbar-meta span,
.score-pill {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.intro {
  min-height: calc(100vh - 126px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 86px);
  padding: 34px 0 28px;
}

.intro > .glass-panel {
  justify-self: center;
  align-self: center;
  width: min(760px, 100%);
}

.intro-copy {
  max-width: 860px;
  animation: fadeLift 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--base-color);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(48px, 6.4vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--charcoal-blue);
}

.lede {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

.glass-panel,
.summary-panel {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.glass-panel {
  padding: 42px;
  animation: fadeLift 0.78s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.faq-section-heading {
  width: min(780px, 100%);
  margin: 12px auto 18px;
  text-align: center;
  animation: fadeLift 0.72s 0.14s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.faq-section-heading .eyebrow {
  margin-bottom: 10px;
}

.faq-section-heading h2 {
  margin-bottom: 0;
  color: var(--charcoal-blue);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.faq-panel {
  width: min(780px, 100%);
  margin: 0 auto 132px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  animation: fadeLift 0.78s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.faq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.faq-head .eyebrow {
  margin-bottom: 8px;
}

.faq-head h2 {
  margin-bottom: 0;
  color: var(--charcoal-blue);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.language-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}

.language-toggle::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 18px) / 2);
  border-radius: 999px;
  background: linear-gradient(135deg, #1f4db8, #2ebb79);
  box-shadow: 0 10px 22px rgba(31, 77, 184, 0.2);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.language-toggle.is-uk::before {
  transform: translateX(calc(100% + 6px));
}

.language-toggle button {
  position: relative;
  z-index: 1;
  min-width: 58px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  transition: color 0.24s ease;
}

.language-toggle button.is-active {
  color: white;
}

[data-faq-de] {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.faq-panel.is-switching [data-faq-de] {
  opacity: 0;
  transform: translateY(4px);
}

.faq-list {
  display: grid;
  gap: 18px;
}

.faq-list article {
  padding-top: 18px;
  border-top: 1px solid rgba(18, 32, 58, 0.1);
}

.faq-list h3 {
  margin: 0 0 8px;
  color: var(--charcoal-blue);
  font-size: 19px;
  line-height: 1.25;
}

.faq-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.setup-form fieldset,
.setup-form .primary-btn {
  animation: fadeLift 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.setup-form fieldset:nth-child(1) {
  animation-delay: 0.2s;
}

.setup-form fieldset:nth-child(2) {
  animation-delay: 0.28s;
}

.setup-form .primary-btn {
  animation-delay: 0.36s;
}

fieldset {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--charcoal-blue);
  font-size: 18px;
  font-weight: 900;
}

.option-grid {
  display: grid;
  gap: 10px;
}

.mode-grid {
  grid-template-columns: 1fr;
}

.level-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  width: 100%;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--slate-blue);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth), background var(--transition-smooth);
}

.option-card input:checked + span {
  border-color: rgba(31, 77, 184, 0.48);
  background: linear-gradient(135deg, #edf3ff, #ffffff);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.option-card:hover span {
  border-color: rgba(31, 77, 184, 0.28);
  transform: translateY(-1px);
}

.primary-btn,
.ghost-btn,
.icon-btn {
  min-height: 58px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.primary-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  background: linear-gradient(135deg, #1f4db8, #2ebb79);
  color: white;
  box-shadow: 0 18px 34px rgba(31, 77, 184, 0.24);
}

.ghost-btn,
.icon-btn {
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--charcoal-blue);
}

.ghost-btn {
  padding: 0 20px;
}

.icon-btn {
  width: 48px;
  flex: 0 0 48px;
  font-size: 20px;
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.trainer-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  gap: 8px;
}

.session-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 900;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  gap: 8px 18px;
  order: 2;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.session-panel > div:not(.progress-track) {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 24px;
}

.panel-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.session-panel strong {
  color: var(--charcoal-blue);
  font-size: 36px;
  line-height: 1;
}

.progress-track {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 0;
  background: rgba(18, 32, 58, 0.1);
}

.setup-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 124px;
  display: grid;
  place-items: end center;
  padding: 0 20px 18px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.22);
}

.setup-footer span {
  position: relative;
  z-index: 1;
}

.setup-wave {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 154px;
  z-index: 0;
  display: block;
}

.setup-wave path {
  transform-origin: center bottom;
  will-change: d, transform;
}

.wave-back {
  fill: rgba(112, 174, 255, 0.62);
  animation: svgWaveBack 3.8s ease-in-out infinite alternate;
}

.wave-front {
  fill: url("#waveGradient");
  animation: svgWaveFront 2.8s ease-in-out infinite alternate;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(135deg, #1f4db8, #2ebb79);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-stage {
  width: 100%;
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.verb-card {
  width: min(640px, 100%);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: cardFaceIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.card-head,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-head {
  justify-content: space-between;
}

.level-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.level-chip {
  background: var(--solitude-blue);
  color: var(--base-dark);
  font-size: 22px;
  line-height: 1;
}

.prompt-block {
  margin: 58px 0 30px;
  text-align: center;
}

.prompt-block span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 900;
}

.prompt-block h2 {
  margin-bottom: 10px;
  color: var(--charcoal-blue);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(48px, 8vw, 86px);
  line-height: 1;
  letter-spacing: 0;
}

.prompt-block p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.audio-btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 10px;
  border: 1.5px solid rgba(31, 77, 184, 0.18);
  border-radius: 14px;
  background: #ffffff;
  color: var(--base-dark);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.audio-btn img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.header-audio-btn {
  margin-top: 0;
}

.audio-btn:hover {
  border-color: rgba(31, 77, 184, 0.38);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.card-face {
  display: flex;
  flex-direction: column;
}

.front-face {
  flex: 1;
  justify-content: center;
}

.back-face {
  flex: 1;
}

.back-title {
  margin: 28px 0 22px;
}

.back-title h2 {
  font-size: clamp(38px, 6vw, 58px);
}

.back-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.three-tile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-tile,
.examples-panel {
  border: 1px solid rgba(18, 32, 58, 0.1);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.info-tile {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
}

.info-tile span,
.examples-panel > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-tile strong {
  color: var(--charcoal-blue);
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.translation-tile {
  background: rgba(46, 187, 121, 0.1);
  border-color: rgba(46, 187, 121, 0.22);
}

.translation-tile strong {
  color: #18734b;
  font-size: clamp(20px, 3.5vw, 28px);
}

.examples-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 16px 18px;
  text-align: center;
}

.example {
  margin: 0;
  color: var(--slate-blue);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.example strong {
  color: var(--charcoal-blue);
}

.muted-example {
  color: var(--muted);
}

.is-flipped {
  background: rgba(255, 255, 255, 0.94);
  animation-name: cardFlipIn;
}

.single-action {
  justify-content: center;
}

.single-action .primary-btn {
  width: min(340px, 100%);
}

.actions {
  margin-top: 22px;
}

.actions .primary-btn,
.actions .ghost-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.previous-card-btn {
  flex: 0.72 1 0;
}

.previous-card-btn:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.summary-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 36px;
  overflow: hidden;
}

.summary-panel {
  position: relative;
  width: min(960px, 100%);
  min-height: min(720px, calc(100vh - 72px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.summary-panel h1 {
  margin-bottom: 14px;
  font-size: clamp(46px, 8vw, 86px);
  animation: fadeLift 0.72s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-logo {
  width: 112px;
  height: 82px;
  margin-bottom: 24px;
  object-fit: contain;
  animation: fadeLift 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-panel .eyebrow {
  animation: fadeLift 0.64s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-panel .lede {
  margin-inline: auto;
  animation: fadeLift 0.7s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-stats {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 18px;
  animation: fadeLift 0.72s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-stats article {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(18, 32, 58, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.summary-stats span,
.summary-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-stats strong {
  color: var(--charcoal-blue);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.summary-note {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
  animation: fadeLift 0.72s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  width: min(520px, 100%);
  animation: fadeLift 0.72s 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardFaceIn {
  from {
    opacity: 0;
    transform: translateY(10px) rotateX(2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@keyframes cardFlipIn {
  0% {
    opacity: 0;
    transform: rotateY(-82deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }
}

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes svgWaveFront {
  0% {
    d: path("M0 90 Q360 128 720 90 T1440 90 V180 H0 Z");
  }
  50% {
    d: path("M0 82 Q360 42 720 82 T1440 82 V180 H0 Z");
  }
  100% {
    d: path("M0 90 Q360 128 720 90 T1440 90 V180 H0 Z");
  }
}

@keyframes svgWaveBack {
  0% {
    d: path("M0 104 Q360 56 720 104 T1440 104 V180 H0 Z");
  }
  50% {
    d: path("M0 96 Q360 138 720 96 T1440 96 V180 H0 Z");
  }
  100% {
    d: path("M0 104 Q360 56 720 104 T1440 104 V180 H0 Z");
  }
}


@media (min-width: 861px) {
  .shell {
    width: 100%;
    padding: 12px 36px 40px;
  }

  .intro {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .intro > .glass-panel {
    justify-self: start;
    width: min(760px, calc(100% - 36px));
  }

  .intro-copy {
    max-width: 820px;
  }

  .trainer-layout {
    grid-template-columns: 1fr;
  }

  .card-stage {
    justify-items: center;
  }

  .verb-card {
    width: min(640px, 100%);
  }
}

@media (min-width: 890px) {
  .verb-card {
    width: min(820px, 100%);
  }
}

@media (max-width: 860px) {
  .topbar {
    min-height: 94px;
    align-items: center;
    padding: 18px 20px;
  }

  .setup-shell {
    padding-top: 100px;
  }

  .trainer-topbar {
    grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr);
    min-height: 104px;
    padding: 18px 0 12px;
  }

  .trainer-topbar .icon-btn {
    width: 64px;
    min-height: 44px;
    flex-basis: 64px;
    font-size: 25px;
  }

  .trainer-topbar-spacer {
    width: 64px;
    height: 44px;
  }

  .trainer-logo {
    width: 104px;
    height: 76px;
  }

  .topbar-meta {
    display: none;
  }

  .intro,
  .trainer-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 26px;
  }

  .faq-panel {
    margin-bottom: 118px;
  }

  .faq-head {
    flex-direction: column;
  }

  .trainer-layout {
    gap: 8px;
  }

  .session-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  body.is-training {
    padding-bottom: 18px;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .setup-shell {
    padding-top: 86px;
  }

  h1 {
    font-size: 42px;
  }

  .lede {
    font-size: 17px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 68px;
    height: 46px;
  }

  .brand-copy {
    min-height: 44px;
    padding-right: 78px;
  }

  .brand strong,
  .godeutsch-wordmark,
  .brand.compact strong {
    font-size: 29px;
  }

  .brand small,
  .brand.compact small {
    left: calc(100% - 88px);
    top: 18px;
    font-size: 34px;
  }

  .trainer-logo {
    width: 86px;
    height: 62px;
  }

  .glass-panel,
  .verb-card,
  .summary-panel {
    border-radius: 22px;
  }

  .glass-panel,
  .verb-card,
  .summary-panel {
    padding: 18px;
  }

  .faq-panel {
    padding: 22px;
  }

  .faq-list p {
    font-size: 16px;
  }

  .session-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: min(100%, 820px);
    padding: 10px 0 14px;
  }

  .level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-block {
    margin: 34px 0 22px;
  }

  .prompt-block h2 {
    font-size: 46px;
    overflow-wrap: anywhere;
  }

  .verb-card {
    min-height: 520px;
  }

  .three-tile-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .summary-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .actions .primary-btn,
  .actions .ghost-btn {
    width: 100%;
  }
}

@media (max-width: 300px) {
  .brand small,
  .brand.compact small {
    left: calc(100% - 104px);
    top: 13px;
    font-size: clamp(28px, 12vw, 34px);
  }

  .setup-form fieldset:first-child legend {
    text-align: center;
  }

  .faq-head {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .faq-head h2 {
    font-size: 30px;
  }

  .language-toggle {
    padding: 5px;
    gap: 5px;
  }

  .language-toggle::before {
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 15px) / 2);
  }

  .language-toggle.is-uk::before {
    transform: translateX(calc(100% + 5px));
  }

  .language-toggle button {
    min-width: 44px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (max-width: 370px) {
  .session-panel {
    gap: 6px 8px;
  }

  .session-panel > div:not(.progress-track) {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
  }

  .panel-label {
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .session-panel strong {
    max-width: 100%;
    font-size: clamp(22px, 9vw, 30px);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .progress-track {
    height: 7px;
  }

  .back-grid,
  .three-tile-grid {
    grid-template-columns: 1fr;
  }

  .info-tile {
    min-height: 106px;
    padding: 16px;
  }

  .info-tile strong,
  .translation-tile strong {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }
}
