@font-face {
  font-family: "CC Mighty Mouth";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-BoldItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth Bounce";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-BounceRegular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth Bounce";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-BounceItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth Bounce";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-BounceBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "CC Mighty Mouth Bounce";
  src: url("assets/fonts/mighty-mouth/CCMightyMouth-BounceBoldItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "CC Biff Bam Boom";
  src: url("assets/fonts/biff-bam-boom/CCBiffBamBoom-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Biff Bam Boom Outline";
  src: url("assets/fonts/biff-bam-boom/CCBiffBamBoom-Outline.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #060606;
  --paper: #fff7de;
  --chalk: #f8f4ea;
  --charcoal: #181818;
  --panel: #242424;
  --line: #050505;
  --yellow: #ffd823;
  --cyan: #23c8f2;
  --pink: #ff4fa3;
  --green: #62d46f;
  --purple: #b053ff;
  --muted: #b9b4aa;
  --font-body: "CC Mighty Mouth", "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  --font-comic: "CC Mighty Mouth", "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  --font-comic-bounce: "CC Mighty Mouth Bounce", "CC Mighty Mouth", "Comic Sans MS", cursive;
  --font-language: "CC Mighty Mouth", "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  --font-action: "CC Biff Bam Boom", "CC Mighty Mouth", "Comic Sans MS", "Trebuchet MS", sans-serif;
  --font-action-outline: "CC Biff Bam Boom Outline", "CC Biff Bam Boom", "CC Mighty Mouth", cursive;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 35, 0.12), transparent 32rem),
    linear-gradient(135deg, #111 0%, #252525 48%, #151515 100%);
  color: var(--chalk);
  font-weight: 400;
}

button,
a {
  font: inherit;
}

button,
select,
summary,
h1,
h2,
h3,
.brand-banner,
.panel-label,
.control-label,
.timeline-label,
.pause-toggle,
.insight-scroll-cue,
.language-scroll-cue,
.related-open-link {
  font-family: var(--font-comic);
}

.brand-banner,
.panel-label,
.control-label,
.timeline-label,
.related-item small,
.related-episode-label {
  font-family: var(--font-action);
  font-weight: 400;
  letter-spacing: 0.12em;
}

.app-shell {
  width: min(1600px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.site-footer {
  width: min(1600px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--chalk);
  text-decoration-color: rgba(248, 244, 234, 0.45);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--yellow);
  text-decoration-color: currentColor;
}

.site-footer a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.episode-heading {
  position: relative;
  min-width: 0;
}

.episode-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin: -6px;
  padding: 6px;
  cursor: pointer;
  color: var(--chalk);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  text-align: left;
  white-space: nowrap;
}

.episode-menu-button:hover,
.episode-menu-button[aria-expanded="true"] {
  color: var(--yellow);
  background: rgba(255, 216, 35, 0.09);
}

.episode-menu-button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.episode-menu-chevron {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 160ms ease;
}

.episode-menu-button[aria-expanded="true"] .episode-menu-chevron {
  transform: translateY(3px) rotate(225deg);
}

.episode-menu {
  position: absolute;
  top: calc(100% + 13px);
  left: -6px;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: max-content;
  min-width: min(250px, calc(100vw - 32px));
  max-width: min(360px, calc(100vw - 32px));
  max-height: min(430px, calc(100vh - 120px));
  padding: 9px;
  overflow-y: auto;
  background:
    linear-gradient(145deg, rgba(255, 216, 35, 0.14), transparent 58%),
    #262626;
  border: 4px solid var(--line);
  border-radius: 10px;
  box-shadow: 7px 7px 0 var(--line);
  scrollbar-color: var(--yellow) #111;
  scrollbar-width: thin;
}

.episode-menu::-webkit-scrollbar {
  width: 11px;
}

.episode-menu::-webkit-scrollbar-track {
  background: #111;
}

.episode-menu::-webkit-scrollbar-thumb {
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.episode-season-group {
  display: grid;
  gap: 6px;
}

.episode-season-option,
.episode-menu-option {
  width: 100%;
  padding: 10px 13px;
  cursor: pointer;
  color: var(--chalk);
  background: #353535;
  border: 2px solid transparent;
  border-radius: 7px;
  font-family: var(--font-comic);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.episode-season-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.episode-season-chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateX(-2px) rotate(-45deg);
  transition: transform 160ms ease;
}

.episode-season-option[aria-expanded="true"] .episode-season-chevron {
  transform: translateY(-2px) rotate(45deg);
}

.episode-season-submenu {
  display: grid;
  gap: 6px;
  margin-left: 14px;
  padding-left: 8px;
  border-left: 4px solid var(--yellow);
}

.episode-menu-option {
  color: var(--muted);
  background: #303030;
}

.episode-season-option:hover,
.episode-season-option:focus-visible,
.episode-menu-option:hover,
.episode-menu-option:focus-visible {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--line);
  outline: none;
}

.episode-season-option.selected {
  color: var(--cyan);
  border-color: var(--cyan);
}

.episode-menu-option.selected {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--line);
  box-shadow: 3px 3px 0 var(--line);
}

.episode-menu-option.selected::after {
  content: "✓";
  float: right;
  margin-left: 18px;
}

.load-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  color: white;
  background: var(--pink);
  border: 3px solid var(--line);
}

.load-error:empty {
  display: none;
}

.brand-banner {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 12px 17px;
  color: var(--ink);
  background: var(--yellow);
  border: 4px solid var(--line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--line);
  font-size: 32px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.1875em;
  line-height: 0.8421;
  letter-spacing: 0.022em;
}

.brand-companion {
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 3px solid var(--ink);
  font-size: 0.48em;
  line-height: 0.92;
  letter-spacing: 0.13em;
}

.panel-label {
  margin: 0 0 6px;
  color: var(--yellow);
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.reo-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  color: var(--chalk);
  background: #050505;
  border: 3px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}

.reo-badge img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.hero-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

.video-size-compact .hero-layout {
  grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
}

.video-size-max .hero-layout {
  grid-template-columns: minmax(0, 1fr) clamp(360px, 27vw, 420px);
}

.video-stack {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  align-self: start;
  gap: 18px;
  min-width: 0;
}

.video-panel,
.now-panel,
.learning-panel {
  border: 5px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--line);
}

.video-panel {
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  scroll-margin-top: 10px;
}

#player {
  width: 100%;
  height: 100%;
}

.now-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 216, 35, 0.18), transparent 55%),
    var(--panel);
}

.insights-list,
.insight-content,
.language-scroll-content {
  scrollbar-color: var(--yellow) #111;
  scrollbar-width: thin;
}

.insights-list::-webkit-scrollbar,
.insight-content::-webkit-scrollbar,
.language-scroll-content::-webkit-scrollbar {
  width: 11px;
}

.insights-list::-webkit-scrollbar-track,
.insight-content::-webkit-scrollbar-track,
.language-scroll-content::-webkit-scrollbar-track {
  background: #111;
}

.insights-list::-webkit-scrollbar-thumb,
.insight-content::-webkit-scrollbar-thumb,
.language-scroll-content::-webkit-scrollbar-thumb {
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.now-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 0;
}

.episode-intro {
  flex: 1;
  display: none;
  place-items: center;
  min-height: 0;
  padding: 8px;
}

.now-panel.empty .episode-intro {
  display: grid;
}

.now-panel.empty .now-content {
  display: none;
}

.episode-intro-card {
  width: min(100%, 720px);
  padding: clamp(20px, 2.2vw, 34px);
  color: var(--ink);
  background: var(--paper);
  border: 4px solid var(--line);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--line);
}

.episode-intro-card > h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 2.1vw, 38px);
  line-height: 1.05;
}

.episode-intro-card > p {
  margin-bottom: 20px;
  color: #40392f;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 400;
}

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

.video-size-max .episode-intro-steps {
  grid-template-columns: 1fr;
}

.episode-intro-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
  background: rgba(35, 200, 242, 0.17);
  border: 3px solid var(--line);
  border-radius: 8px;
}

.episode-intro-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-comic);
  font-weight: 700;
}

.episode-intro-step strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-comic);
  font-size: 16px;
  font-weight: 700;
}

.episode-intro-step p {
  margin: 0;
  color: #40392f;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
}

.video-size-compact .now-content.has-drawers {
  grid-template-columns: fit-content(58%) minmax(20rem, 1fr);
}

.video-size-max .now-content {
  grid-template-rows: auto minmax(0, 1fr);
}

.now-panel.empty .sentence-card,
.now-panel.empty .insights-list {
  visibility: hidden;
}

.sentence-card {
  align-self: start;
  min-width: min(100%, 14rem);
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(16px, 1.8vw, 26px);
  color: var(--ink);
  background: var(--paper);
  border: 4px solid var(--line);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--line);
}

.sentence-card h2 {
  margin-bottom: 14px;
  font-family: var(--font-language);
  font-size: clamp(28px, 2.25vw, 42px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sentence-translation {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 2px solid rgba(23, 23, 23, 0.24);
  line-height: 1.2;
  font-size: clamp(18px, 1.4vw, 23px);
  font-family: var(--font-language);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.video-size-max .sentence-card {
  padding: 16px;
}

.video-size-max .sentence-card h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 1.7vw, 30px);
}

.video-size-max .sentence-translation {
  padding-top: 9px;
  font-size: clamp(17px, 1.15vw, 19px);
}

.marker,
.quiz-option,
.swap-button {
  cursor: pointer;
  border: 4px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 700;
}

.panel-label,
.sentence-card,
.insights-list,
.panel-heading,
.breakdown-list,
.vocab-list,
.related-list,
.pattern-builder,
.quiz-options,
.quiz-feedback {
  transition: opacity 600ms ease;
}

body.content-is-updating .sentence-card,
body.is-inactive .sentence-card,
body.content-is-updating .insights-list,
body.is-inactive .insights-list,
body.content-is-updating .panel-label,
body.is-inactive .panel-label,
body.content-is-updating .panel-heading,
body.is-inactive .panel-heading,
body.content-is-updating .breakdown-list,
body.is-inactive .breakdown-list,
body.content-is-updating .vocab-list,
body.is-inactive .vocab-list,
body.content-is-updating .related-list,
body.is-inactive .related-list,
body.content-is-updating .pattern-builder,
body.is-inactive .pattern-builder,
body.content-is-updating .quiz-options,
body.is-inactive .quiz-options,
body.content-is-updating .quiz-feedback,
body.is-inactive .quiz-feedback {
  opacity: 0.15;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0 7px 7px 0;
  overflow-y: auto;
}

.insights-list:empty {
  display: none;
}

.insight-drawer {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 8px;
}

.insight-drawer[open] {
  flex: 1 1 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.reo-message-drawer.reo-message-delayed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 6000ms ease,
    visibility 0s linear 6000ms;
}

.reo-message-drawer.reo-message-delayed.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition:
    opacity 6000ms ease,
    visibility 0s;
}

.insight-drawer summary {
  padding: 10px 34px 10px 12px;
  cursor: pointer;
  list-style: none;
  position: relative;
  background: var(--yellow);
  font-size: 14px;
  font-weight: 700;
}

.insight-drawer summary::-webkit-details-marker {
  display: none;
}

.insight-drawer summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
}

.insight-drawer[open] summary::after {
  content: "−";
}

.insight-content {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 11px 12px 12px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

.insight-content p {
  margin: 0;
}

.insight-content.has-scroll-cue {
  padding-bottom: 44px;
}

.insight-scroll-cue {
  position: absolute;
  right: 18px;
  bottom: 9px;
  z-index: 2;
  padding: 5px 9px;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--line);
  font-size: 11px;
  font-weight: 700;
}

.insight-literal {
  color: #51483e;
  font-style: italic;
}

.reo-message-content {
  align-content: start;
  padding: clamp(18px, 2vw, 26px);
  overflow-y: auto;
}

.reo-message-layout {
  display: grid;
  grid-template-columns: clamp(72px, 7vw, 96px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
  width: min(100%, 760px);
}

.reo-message-logo {
  display: block;
  width: 100%;
  height: auto;
}

.reo-message-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.reo-message-lead {
  font-size: clamp(13px, 0.95vw, 14px);
  line-height: 1.3;
  font-weight: 400;
}

.reo-message-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 13px;
  margin-top: 7px;
}

.reo-message-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 13px;
  cursor: pointer;
  color: var(--ink);
  background: var(--cyan);
  border: 3px solid var(--line);
  border-radius: 7px;
  box-shadow: 3px 3px 0 var(--line);
  font-weight: 700;
}

.reo-message-button:hover,
.reo-message-button:focus-visible {
  background: var(--yellow);
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.reo-message-button-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: end;
}

.control-label,
.timeline-label {
  color: var(--yellow);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  white-space: nowrap;
}

.segmented-control {
  display: inline-flex;
  gap: 0;
  padding: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
}

.size-button {
  min-width: 58px;
  min-height: 29px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--chalk);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.size-button.active {
  color: var(--ink);
  background: var(--cyan);
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

.timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.marker {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: #f3f0e7;
  box-shadow: 3px 3px 0 var(--line);
  touch-action: manipulation;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.marker:hover,
.marker:focus-visible {
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--line);
  transform: translate(-1px, -2px);
}

.marker:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.marker::after {
  content: attr(data-tooltip);
  position: absolute;
  display: none;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.marker:hover::after,
.marker:focus-visible::after {
  display: block;
  opacity: 1;
  transform: translate(-50%, 0);
}

.marker.tooltip-left::after {
  left: 0;
  transform: translate(0, 4px);
}

.marker.tooltip-left:hover::after,
.marker.tooltip-left:focus-visible::after {
  transform: translate(0, 0);
}

.marker.tooltip-right::after {
  right: 0;
  left: auto;
  transform: translate(0, 4px);
}

.marker.tooltip-right:hover::after,
.marker.tooltip-right:focus-visible::after {
  transform: translate(0, 0);
}

.marker-icon {
  width: 9px;
  height: 12px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.marker.active {
  background: var(--pink);
  color: white;
  box-shadow: 2px 2px 0 var(--line);
  transform: translate(1px, 1px);
}

.marker.active .marker-icon {
  background: white;
}

.pause-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 4px 7px;
  color: var(--chalk);
  background: rgba(255, 255, 255, 0.08);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pause-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--pink);
}

.learning-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.8fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.learning-grid.language-empty,
.learning-grid.practice-empty {
  grid-template-columns: 1fr;
}

.learning-grid.language-empty .practice-zone,
.learning-grid.practice-empty .language-panel {
  grid-column: 1;
}

.learning-panel {
  min-height: 0;
  padding: 16px;
  background: var(--panel);
}

.language-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
}

.language-panel {
  background:
    linear-gradient(180deg, rgba(35, 200, 242, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(98, 212, 111, 0.16), transparent 60%),
    var(--panel);
}

.language-scroll-content {
  min-height: 0;
  padding-right: 8px;
  overflow-y: scroll;
}

.language-panel-title {
  margin: 0 0 10px;
  color: var(--yellow);
  font-family: var(--font-action);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.language-subheading {
  margin-bottom: 8px;
  padding-bottom: 4px;
  color: #e7f7f5;
  border-bottom: 2px solid rgba(231, 247, 245, 0.45);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.language-scroll-cue {
  position: static;
  justify-self: end;
  z-index: 2;
  margin: 8px 6px 1px 0;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 12px;
  font-weight: 700;
}

.language-section + .language-section {
  margin-top: 18px;
}

.practice-zone {
  grid-column: 2;
  grid-row: 1;
  padding: 14px;
  border: 4px solid var(--yellow);
  border-radius: 8px;
  box-shadow:
    0 0 0 5px var(--line),
    9px 9px 0 var(--line);
  background:
    linear-gradient(180deg, rgba(255, 216, 35, 0.16), transparent 58%),
    linear-gradient(135deg, rgba(176, 83, 255, 0.16), rgba(255, 79, 163, 0.08)),
    rgba(20, 20, 20, 0.62);
}

.practice-title {
  margin-bottom: 12px;
}

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

.practice-grid.single-practice {
  grid-template-columns: 1fr;
}

.pattern-panel {
  background:
    linear-gradient(180deg, rgba(176, 83, 255, 0.18), transparent 60%),
    var(--panel);
}

.quiz-panel {
  background:
    linear-gradient(180deg, rgba(255, 79, 163, 0.16), transparent 60%),
    var(--panel);
}

.related-panel {
  margin-top: 24px;
  background:
    linear-gradient(90deg, rgba(35, 200, 242, 0.12), rgba(255, 216, 35, 0.1)),
    var(--panel);
}

.related-reference {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 24px;
  margin-bottom: 18px;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 9px;
  box-shadow: 4px 4px 0 var(--line);
}

.related-reference-lead,
.related-source-sentence,
.related-source-translation,
.related-type-description {
  margin: 0;
}

.related-reference-lead {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.related-source-sentence {
  grid-column: 1 / -1;
  font-family: var(--font-language);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.18;
  font-weight: 700;
}

.related-source-translation {
  grid-column: 1 / -1;
  color: #5d554b;
  font-family: var(--font-language);
  font-size: 14px;
  line-height: 1.2;
}

.related-type-filters {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.related-type-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
  background: #f7f2e5;
  border: 3px solid var(--line);
  border-radius: 7px;
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-comic);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.related-type-filter-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.related-type-filter:hover,
.related-type-filter:focus-visible,
.related-type-filter.selected {
  background: var(--cyan);
}

.related-type-filter:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.related-type-filter.selected {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.related-type-filter:disabled {
  cursor: not-allowed;
  color: #817b72;
  background: #d5d0c5;
  border-color: #817b72;
  box-shadow: none;
  opacity: 0.68;
}

.related-type-description {
  grid-column: 2;
  grid-row: 1;
  height: 2.5em;
  max-width: 420px;
  color: #5d554b;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}

.related-spoiler-control {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
  background: #f7f2e5;
  border: 3px solid var(--line);
  border-radius: 7px;
  box-shadow: 3px 3px 0 var(--line);
}

.related-spoiler-control:hover {
  background: #fff8d8;
}

.related-spoiler-control:focus-within {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.related-spoiler-control input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.related-spoiler-copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.related-spoiler-copy strong {
  font-family: var(--font-comic);
  font-size: 11px;
}

.related-spoiler-copy small {
  color: #5d554b;
  font-family: var(--font-body);
  font-size: 9px;
}

.related-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 2fr);
  gap: 18px;
  align-items: stretch;
  height: clamp(560px, 34vw, 620px);
  min-height: 0;
}

.related-layout.is-empty {
  display: block;
  height: auto;
}

.related-reference.is-empty .related-reference-lead,
.related-reference.is-empty .related-source-sentence,
.related-reference.is-empty .related-source-translation {
  display: none;
}

.panel-heading h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
}

.breakdown-list,
.vocab-list,
.pattern-builder,
.quiz-options {
  display: grid;
  gap: 9px;
}

.breakdown-item,
.vocab-item,
.pattern-output {
  padding: 10px 12px;
  color: var(--ink);
  background: #f7f2e5;
  border: 3px solid var(--line);
  border-radius: 8px;
}

.related-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 2px 8px 8px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--cyan) rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
}

.related-list::-webkit-scrollbar {
  width: 9px;
}

.related-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.related-list::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.related-empty-state {
  margin: 0;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 13px;
  line-height: 1.35;
}

.related-group-heading {
  position: sticky;
  top: -2px;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 4px 0 1px;
  padding: 6px 8px 5px;
  color: var(--yellow);
  background: #172b29;
  border: 2px solid var(--yellow);
  border-radius: 6px;
  font-family: var(--font-comic);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.related-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 11px;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
  text-align: left;
  touch-action: manipulation;
  transition: background 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

.related-item:hover,
.related-item:focus-visible {
  background: #fff8d8;
  box-shadow: 6px 6px 0 var(--line);
  transform: translate(-2px, -2px);
}

.related-item:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.related-item.selected {
  background: var(--cyan);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.related-item strong {
  font-family: var(--font-language);
  font-size: 16px;
  line-height: 1.18;
  font-weight: 700;
}

.related-item .related-item-type {
  justify-self: start;
  padding: 3px 6px;
  color: var(--ink);
  background: #e8f4f1;
  border: 2px solid #315d66;
  border-radius: 4px;
  font-family: var(--font-comic);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.related-item .related-item-type-exact-sentence {
  background: #fff0a8;
  border-color: #755c00;
}

.related-item span {
  color: #38322b;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
}

.related-item .related-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
}

.related-item .related-item-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 5px;
  box-shadow: 2px 2px 0 var(--line);
  font-family: var(--font-comic);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.related-item .related-item-action span {
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  line-height: 0.8;
}

.related-list-reset {
  display: none;
  justify-self: start;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  border-radius: 7px;
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-comic);
  font-weight: 700;
}

.related-item small,
.related-episode-label {
  color: #5d554b;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.related-item small {
  font-family: var(--font-comic);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.related-match-highlight {
  padding: 0 3px;
  color: inherit;
  background: var(--yellow);
  border: 2px solid #755c00;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.related-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding:
    clamp(28px, 2.4vw, 42px)
    clamp(36px, 4vw, 64px)
    clamp(48px, 4vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(35, 200, 242, 0.13), transparent 48%),
    #142321;
  border: 3px solid var(--line);
  border-left: 8px solid var(--cyan);
  border-radius: 10px;
  box-shadow:
    6px 6px 0 var(--line),
    inset 0 0 0 2px rgba(255, 216, 35, 0.12);
}

.related-preview-label {
  justify-self: start;
  margin: 0;
  padding: 5px 9px 4px;
  color: var(--yellow);
  background: rgba(0, 0, 0, 0.52);
  border: 2px solid var(--yellow);
  border-radius: 5px;
  font-family: var(--font-action);
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.related-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  justify-self: center;
  width: min(100%, 560px);
  min-width: 0;
}

.related-preview-copy,
.related-preview-media {
  display: grid;
  align-content: start;
  gap: 10px;
  justify-self: center;
  width: min(100%, 560px);
  min-width: 0;
}

.related-preview-media {
  scroll-margin-top: 10px;
}

.related-episode-label {
  margin: 0;
  color: var(--yellow);
}

.related-sentence-card {
  padding: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
}

.related-sentence-card h3 {
  margin: 0 0 9px;
  font-family: var(--font-language);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.related-sentence-card p {
  margin: 0;
  padding-top: 9px;
  border-top: 2px solid rgba(23, 23, 23, 0.2);
  font-size: 15px;
  line-height: 1.25;
  font-family: var(--font-language);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.related-video {
  overflow: hidden;
  background: #000;
  border: 3px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}

.related-video iframe,
#relatedPlayer {
  width: 100%;
  height: 100%;
  border: 0;
}

.related-open-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--cyan);
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.related-open-link-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1250px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .reo-badge {
    margin-left: auto;
  }

  .related-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .app-shell {
    width: min(760px, calc(100vw - 28px));
    padding-top: 18px;
  }

  .video-size-compact .hero-layout,
  .video-size-max .hero-layout {
    grid-template-columns: 1fr;
  }

  .now-panel {
    height: auto;
    overflow: visible;
  }

  .video-size-compact .now-content.has-drawers,
  .video-size-max .now-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .sentence-card {
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  .insights-list {
    display: grid;
    overflow: visible;
    padding-right: 0;
  }

  .insight-drawer[open] {
    display: block;
  }

  .insight-content {
    overflow: visible;
  }

  .insight-scroll-cue {
    display: none;
  }

  .layout-control,
  .layout-control-label {
    display: none;
  }

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

  .language-panel,
  .practice-zone {
    grid-column: 1;
  }

  .language-panel {
    display: block;
    grid-row: 1;
    height: auto !important;
    overflow: visible;
  }

  .language-scroll-content {
    padding-right: 0;
    overflow: visible;
  }

  .language-scroll-cue {
    display: none;
  }

  .practice-zone {
    grid-row: 2;
  }

  .related-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .related-reference {
    grid-template-columns: 1fr;
  }

  .related-type-filters,
  .related-type-description,
  .related-spoiler-control {
    grid-column: 1;
  }

  .related-type-filters {
    grid-row: auto;
    align-self: auto;
    justify-content: flex-start;
  }

  .related-type-description {
    grid-row: auto;
    max-width: none;
    text-align: left;
  }

  .related-spoiler-control {
    grid-row: auto;
    justify-self: start;
  }

  .related-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(56vh, 520px);
    padding: 2px 8px 8px 2px;
    overflow-y: auto;
  }

  .related-preview {
    height: auto;
    padding: 30px;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100vw - 20px);
    padding: 10px 0 24px;
  }

  .site-footer {
    width: calc(100vw - 32px);
    padding-bottom: 20px;
    font-size: 13px;
  }

  .topbar,
  .title-row,
  .episode-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 18px;
  }

  .title-row,
  .episode-heading {
    gap: 10px;
  }

  .brand-banner {
    white-space: normal;
    font-size: 27px;
  }

  h1 {
    white-space: normal;
    font-size: 24px;
  }

  .episode-menu-button {
    width: 100%;
    justify-content: space-between;
    white-space: normal;
  }

  .episode-menu {
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .episode-season-option,
  .episode-menu-option {
    min-height: 44px;
  }

  .reo-badge {
    align-self: stretch;
    justify-content: space-between;
    margin-left: 0;
  }

  .hero-layout,
  .video-stack {
    gap: 14px;
  }

  .now-panel,
  .learning-panel,
  .practice-zone {
    padding: 12px;
  }

  .sentence-card h2 {
    font-size: clamp(24px, 6.8vw, 30px);
  }

  .sentence-translation {
    font-size: 18px;
  }

  .episode-intro {
    padding: 0;
  }

  .episode-intro-card {
    padding: 18px;
  }

  .episode-intro-steps {
    grid-template-columns: 1fr;
  }

  .timeline {
    gap: 7px;
  }

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

  .related-list {
    grid-template-columns: 1fr;
    max-height: min(58vh, 480px);
  }

  .related-reference {
    padding: 12px;
  }

  .related-type-filter {
    flex: 1 1 130px;
    justify-content: space-between;
  }

  .related-list.is-focused .related-item:not(.selected) {
    display: none;
  }

  .related-list.is-focused .related-group-heading {
    display: none;
  }

  .related-list.is-focused .related-list-reset {
    display: inline-flex;
  }

  .related-list.is-focused {
    scroll-margin-top: 10px;
  }

  .related-preview {
    margin-inline: 12px;
    padding: 18px 14px 16px;
    border-left-width: 7px;
  }

  .related-preview-label {
    margin-left: -4px;
  }

  .related-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.vocab-word {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-language);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.breakdown-title {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-language);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
}

.breakdown-pattern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin: 2px 0 7px;
  font-family: var(--font-language);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.breakdown-pattern-part {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 7px;
  border: 2px solid;
  border-radius: 5px;
}

.breakdown-pattern-fixed {
  color: #423b32;
  background: #fff0a8;
  border-color: #423b32;
}

.breakdown-pattern-slot {
  color: #24515c;
  background: #e7f7f5;
  border-color: #31525a;
  border-style: dashed;
  font-style: normal;
}

.breakdown-source {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 1px 0 7px;
  color: #544d44;
}

.breakdown-source small {
  color: #776d61;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.breakdown-word {
  font-family: var(--font-language);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.breakdown-role,
.vocab-meaning {
  margin-bottom: 0;
  color: #38322b;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 400;
}

.breakdown-example-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0 0;
}

.breakdown-example-vocab-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 6px;
  color: #31525a;
  background: #e7f7f5;
  border: 2px solid #31525a;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.breakdown-example-vocab-item strong {
  color: #b5342b;
  font-family: var(--font-language);
  font-size: 12px;
  font-weight: 700;
}

.vocab-other-meanings {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 5px 0 0;
  padding: 3px 6px;
  color: #31525a;
  background: #e7f7f5;
  border: 2px solid #31525a;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 400;
}

.vocab-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.vocab-lookup-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #006176;
  background: #e7f7f5;
  border: 2px solid #31525a;
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--line);
  text-decoration: none;
}

.vocab-lookup-link:hover,
.vocab-lookup-link:focus-visible {
  color: var(--ink);
  background: var(--cyan);
}

.vocab-lookup-link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.vocab-lookup-link svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocab-header a {
  color: #006176;
  font-family: var(--font-comic);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.swap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swap-button {
  padding: 9px 11px;
  background: var(--cyan);
  font-family: var(--font-language);
  line-height: 1.2;
  font-weight: 700;
}

.swap-button.active {
  background: var(--yellow);
}

.practice-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.practice-nav-button {
  width: 34px;
  height: 30px;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 16px;
  font-weight: 700;
}

.practice-count {
  min-width: 44px;
  color: var(--yellow);
  font-family: var(--font-comic);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
}

.quiz-nav {
  margin-bottom: 2px;
}

.pattern-output {
  min-height: 110px;
  background: var(--paper);
}

.pattern-output strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-language);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

.pattern-output span {
  font-family: var(--font-language);
  font-weight: 400;
}

.pattern-output .pattern-translation {
  display: block;
  line-height: 1.3;
}

.pattern-output .pattern-changed {
  display: inline-block;
  min-width: 1.15em;
  margin: -2px 2px;
  padding: 1px 5px 2px;
  color: #173f49;
  background: #dff4f4;
  border: 2px solid #315b64;
  border-radius: 6px;
  line-height: 1.05;
  text-align: center;
  vertical-align: baseline;
  white-space: pre-wrap;
}

.pattern-output .pattern-changed-translation {
  color: #8f2d26;
  background: #fff0c7;
  border-color: #8f2d26;
}

.quiz-option {
  width: 100%;
  padding: 12px;
  line-height: 1.25;
  text-align: left;
  background: #f3f0e7;
}

.quiz-option.correct {
  background: var(--green);
}

.quiz-option.incorrect {
  background: var(--pink);
  color: white;
}

.quiz-feedback {
  min-height: 42px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 400;
}
