/* The scene, its card and the coach stay together as one example. */
#voorbeeld {
  --demo-ink: #281339;
  --demo-muted: #695675;
  --demo-violet: #652ec4;
  --demo-line: #d8c7e9;
  --demo-tint: #f1e6fc;
  width: min(1480px, calc(100% - 2 * clamp(16px, 2.6vw, 42px)));
  padding-block: clamp(22px, 3vw, 48px) clamp(36px, 5vw, 80px);
  color: var(--demo-ink);
}
#voorbeeld .demo-heading {
  margin: 0 0 clamp(15px, 1.8vw, 26px);
}
#voorbeeld .demo-heading h1 {
  margin: 0;
  max-inline-size: 27ch;
  text-wrap: balance;
  font-size: clamp(2.15rem, 4.6vw, 4.6rem);
  letter-spacing: -.052em;
  line-height: 1.06;
  font-weight: 760;
}
#voorbeeld .cv-demo__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: clamp(12px, 1.45vw, 20px) 0 0;
}
#voorbeeld .cv-demo__tabs button {
  min-height: 44px;
  padding: 8px clamp(12px, 1.4vw, 22px);
  border: 1px solid var(--demo-line);
  border-radius: 12px;
  background: #fff;
  color: var(--demo-ink);
  font: inherit;
  font-size: clamp(.875rem, 1.2vw, 1.08rem);
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
}
#voorbeeld .cv-demo__tabs button:hover { border-color: #ad88d5; }
#voorbeeld .cv-demo__tabs button[aria-selected="true"],
#voorbeeld .cv-demo__tabs button[aria-pressed="true"] {
  border-color: #cca4f3;
  background: #e4cbfa;
  color: #351147;
}
.cv-demo {
  --panel-padding: clamp(17px, 2vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(14px, 1.55vw, 24px);
  text-align: left;
}
.cv-demo > * { min-width: 0; }
#voorbeeld :is(button, a, summary, textarea):focus-visible {
  outline: 3px solid #7636d4;
  outline-offset: 3px;
}
.cv-demo button, .cv-demo summary { cursor: pointer; }
.cv-demo__viewer {
  align-self: start;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  background: #fffdff;
}
.cv-demo__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #221929;
}
.cv-demo__media iframe, .cv-demo__media img, .cv-demo__watch {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.cv-demo__media img { object-fit: contain; }
.cv-demo .scene-thumbnail--pain {
  transform: scale(1.81818);
  transform-origin: 99.83% 85.49%;
}
.cv-demo__media .cv-demo__watch:focus-visible {
  outline-offset: -5px;
  outline-color: white;
}
.cv-demo__media [data-play-scene] {
  position: absolute;
  inset: auto auto 14px 14px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #ffffffbf;
  border-radius: 50%;
  background: #261c35db;
  color: white;
  font-size: 18px;
}
.cv-demo__media [data-play-scene]:hover { background: var(--demo-violet); }
.cv-demo__media [data-play-scene]:focus-visible { outline-color: white; }
.cv-demo__subtitle {
  margin: 0;
  padding: clamp(12px, 1.5vw, 22px) 13px;
  background: #291e32;
  color: white;
  font-size: clamp(1.4rem, 2.65vw, 2.7rem);
  font-weight: 620;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
.cv-demo__word {
  display: inline-block;
  padding: .02em .17em .075em;
  border: 0;
  border-radius: .2em;
  background: #e7c7ff;
  color: #30133d;
  font-family: inherit;
  font-size: inherit;
  font-weight: 750;
  line-height: 1.22;
  vertical-align: baseline;
}
.cv-demo__word:hover { background: #f7e9ff; }
#voorbeeld .cv-demo__word:focus-visible { outline-color: #fff; }
.cv-demo__subtitle-gloss {
  margin: 0;
  padding: 0 14px 12px;
  background: #291e32;
  color: #f1e2fa;
  text-align: center;
}
.cv-demo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  padding: 2px clamp(12px, 1.4vw, 22px);
  color: var(--demo-muted);
  font-size: clamp(.78rem, 1.1vw, 1rem);
  line-height: 1.4;
}
.cv-demo__source, .cv-demo__repeat, .cv-demo__credits > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 0;
  font: inherit;
}
.cv-demo__source { font-weight: 620; }
.cv-demo__repeat, .cv-demo__credits > summary, .cv-demo__reply,
.cv-demo__question-translation > summary, .cv-demo__sample > summary, .cv-demo__alternate > summary {
  border: 0;
  background: transparent;
  color: #572796;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.cv-demo__source:hover { text-decoration: underline; text-underline-offset: .18em; }
.cv-demo__credits { margin-inline-start: auto; border: 0; }
.cv-demo__credits[open] { flex-basis: 100%; }
.cv-demo__credits[open] > summary { float: none; }
.cv-demo__credit-body {
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 4px 0 14px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.cv-demo__credit-body a, .cv-demo__audio-fallback { color: var(--demo-violet); text-decoration: underline; }
.cv-demo__interaction {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 22px);
}
.cv-demo__flashcard, .cv-demo__conversation {
  min-width: 0;
  padding: var(--panel-padding);
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  background: #fffdff;
}
.cv-demo__flashcard { flex: 1; }
.cv-demo__card-title, .cv-demo__coach-name {
  margin: 0;
  color: var(--demo-ink);
  font-size: clamp(1.2rem, 1.9vw, 1.85rem);
  font-weight: 730;
  line-height: 1.2;
  letter-spacing: -.028em;
}
.cv-demo__card-title { margin-bottom: clamp(12px, 1.3vw, 20px); }
.cv-demo__card-heading {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
}
.cv-demo__word-box { flex: 1; min-width: 0; }
.cv-demo__reading {
  display: block;
  font-size: clamp(1.05rem, 1.65vw, 1.55rem);
  line-height: 1.3;
}
.cv-demo__target {
  margin: 1px 0 4px;
  color: var(--demo-ink);
  font-size: clamp(2.85rem, 5.35vw, 5.5rem);
  font-weight: 740;
  line-height: 1.12;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.cv-demo__meaning {
  margin: 0;
  color: #3b2248;
  font-size: clamp(1.23rem, 2.15vw, 2.1rem);
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.cv-demo__thumb-wrap {
  display: block;
  flex: 0 1 31%;
  aspect-ratio: 1 / 1.13;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #e6dfeb;
}
.cv-demo__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cv-demo__language {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
  color: var(--demo-muted);
  font-size: clamp(.83rem, 1.13vw, 1.04rem);
}
.cv-demo__language img { width: 1.35em; height: auto; }
.cv-demo__language i {
  position: relative;
  display: inline-block;
  width: 1.45em;
  aspect-ratio: 1.5;
  flex: none;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #34223a26;
}
.cv-demo__language .flag-jp {
  background: radial-gradient(circle at center, #bb2848 0 26%, transparent 28%), #fff;
}
.cv-demo__language .flag-br { background: #278150; }
.cv-demo__language .flag-br::before, .cv-demo__language .flag-br::after {
  content: "";
  position: absolute;
}
.cv-demo__language .flag-br::before {
  inset: 1px;
  background: #f1cf4e;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.cv-demo__language .flag-br::after {
  inset: 22% 30%;
  border-radius: 50%;
  background: #28528e;
}
.cv-demo:is([data-scene="naruto"], [data-scene="bleach"]) .cv-demo__meaning {
  padding: .22em .55em;
  border-radius: 9px;
  background: var(--demo-tint);
  font-weight: 630;
}
.cv-demo__replay {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(46px, 4.3vw, 65px);
  height: clamp(46px, 4.3vw, 65px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ecdbfb;
  color: #64309d;
  font-size: 1.45rem;
}
.cv-demo__replay:hover, .cv-demo__replay[aria-pressed="true"] { background: #dbc2f5; }
.cv-demo__replay > svg { width: 48%; height: 48%; }
.cv-demo__translation {
  margin: clamp(14px, 1.5vw, 22px) 0 0;
  padding-top: clamp(12px, 1.35vw, 20px);
  border-top: 1px solid var(--demo-line);
  color: #302038;
  font-size: clamp(1.06rem, 1.75vw, 1.65rem);
  line-height: 1.35;
}
.cv-demo__conversation { display: grid; gap: clamp(12px, 1.35vw, 20px); }
.cv-demo__coach { display: flex; align-items: center; gap: clamp(12px, 1.65vw, 24px); }
.cv-demo__coach > img {
  flex: 0 0 auto;
  width: clamp(62px, 7vw, 110px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}
.cv-demo__coach-copy { min-width: 0; }
.cv-demo__speech {
  margin: .35em 0 0;
  color: var(--demo-ink);
  font-size: clamp(1.04rem, 1.7vw, 1.65rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.cv-demo__speech mark, .cv-demo__sample-answer mark, [data-alt-line] mark {
  padding: 0 .1em;
  border-radius: .18em;
  background: #e4c8fa;
  color: #4a1c68;
  font-weight: 710;
}
.cv-demo__next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  width: 100%;
  min-height: 48px;
  padding: .63em .8em;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--demo-violet);
  color: #fff;
  font: inherit;
  font-size: clamp(1.03rem, 1.6vw, 1.45rem);
  font-weight: 710;
  line-height: 1.25;
}
.cv-demo__next:hover { background: #51229e; }
.cv-demo__rating, .cv-demo__practice-panel {
  min-width: 0;
  margin: 15px 0 0;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid var(--demo-line);
}
.cv-demo__rating legend, .cv-demo__answer-form label { font-size: .93rem; font-weight: 660; }
.cv-demo__rating legend { padding: 0 6px 0 0; }
.cv-demo__grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.cv-demo__grades button, .cv-demo__answer-form button, .cv-demo__practice-actions button, .cv-demo__app {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--demo-line);
  border-radius: 9px;
  background: #fcf9ff;
  color: var(--demo-ink);
  font: inherit;
  font-size: .88rem;
  font-weight: 640;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cv-demo__grades button[aria-pressed="true"], .cv-demo__answer-form button, .cv-demo__app {
  background: var(--demo-violet);
  border-color: var(--demo-violet);
  color: #fff;
}
.cv-demo__grades button:hover, .cv-demo__practice-actions button:hover { border-color: #9c74c6; }
.cv-demo__grade-note, .cv-demo__gloss, .cv-demo__practice-panel p, .cv-demo__alternate p {
  margin: 6px 0 0;
  font-size: .93rem;
  color: var(--demo-muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.cv-demo__grade-note:empty { margin: 0; }
.cv-demo__rating [data-close-grades] { min-height: 44px; padding: 5px 0; }
.cv-demo__practice-panel { display: grid; gap: 13px; margin: 0; }
.cv-demo__practice-panel details, .cv-demo__alternate { border: 0; }
.cv-demo__alternate { margin-top: 9px; }
.cv-demo__alternate > summary {
  flex-wrap: wrap;
  justify-content: start;
  gap: .3em;
}
.cv-demo__alternate > summary span {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  background: transparent;
}
.cv-demo__alternate > summary span::after { content: none; }
.cv-demo__alternate > [data-alt-reading] { display: block; margin-top: 2px; }
.cv-demo :is(.cv-demo__question-translation, .cv-demo__sample, .cv-demo__alternate) > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 6px 0;
  font: inherit;
  font-size: .92rem;
  font-weight: 620;
}
.cv-demo__answer-form { display: grid; gap: 8px; }
.cv-demo__answer-form textarea {
  width: 100%;
  min-height: 75px;
  resize: vertical;
  border: 1px solid #bda9ce;
  border-radius: 9px;
  padding: 10px 12px;
  background: #fff;
  color: var(--demo-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
}
.cv-demo__answer-form button { justify-self: start; padding-inline: 16px; }
.cv-demo__answer-form button:disabled { cursor: default; background: #e9e1ed; border-color: #e9e1ed; color: #6f6475; }
.cv-demo__own-answer, .cv-demo__sample[open] { padding: 8px 12px; border-radius: 9px; background: #f5eef9; }
.cv-demo__practice-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cv-demo__app { display: inline-flex; align-items: center; text-decoration: none; }
#voorbeeld [hidden] { display: none !important; }
@media (scripting: none) {
  #voorbeeld .scene-picker { display: none; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .cv-demo { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .cv-demo__grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #voorbeeld { width: calc(100% - 28px); padding-top: 18px; }
  #voorbeeld .demo-heading h1 { font-size: clamp(2rem, 7.5vw, 2.9rem); }
  .cv-demo { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cv-demo__viewer { border-radius: 13px; }
  .cv-demo figcaption { font-size: .82rem; }
  .cv-demo__subtitle { padding: 10px 8px; font-size: clamp(1.17rem, 5.3vw, 1.8rem); }
  .cv-demo__word { min-height: 44px; }
  .cv-demo__interaction { gap: 13px; }
  .cv-demo__card-title {
    margin: -17px -17px 11px;
    padding: 8px 15px;
    border-radius: 12px 12px 0 0;
    background: #ebddf7;
    font-size: 1.05rem;
  }
  .cv-demo__card-heading { gap: 14px; }
  .cv-demo__flashcard { padding: 17px; border-radius: 13px; }
  .cv-demo[data-scene="kosys"] .cv-demo__card-heading { position: relative; justify-content: center; text-align: center; }
  .cv-demo[data-scene="kosys"] .cv-demo__word-box { flex: 0 1 auto; max-width: calc(100% - 104px); }
  .cv-demo[data-scene="kosys"] .cv-demo__replay { position: absolute; inset-inline-end: 0; top: 27%; }
  .cv-demo__target { font-size: clamp(2.7rem, 11.8vw, 4rem); }
  .cv-demo[data-scene="kosys"] .cv-demo__meaning {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 12px 4px;
    border-radius: 8px;
    background: #553352;
    color: white;
    font-size: 1rem;
  }
  .cv-demo[data-scene="kosys"] .cv-demo__translation { text-align: center; }
  .cv-demo__conversation { padding: 2px 0; border: 0; background: transparent; gap: 11px; }
  .cv-demo__coach { gap: 12px; }
  .cv-demo__coach > img { width: clamp(57px, 16vw, 82px); }
  .cv-demo__speech { width: fit-content; padding: 7px 11px; border-radius: 3px 12px 12px; background: var(--demo-tint); }
  .cv-demo__speech mark, .cv-demo__sample-answer mark { background: transparent; color: #6330a0; }
  .cv-demo__next { min-height: 47px; }
  .cv-demo__practice-panel { padding-inline: 3px; }
}
@media (max-width: 370px) {
  #voorbeeld .cv-demo__tabs { gap: 5px; }
  #voorbeeld .cv-demo__tabs button { padding-inline: 9px; font-size: .82rem; }
  .cv-demo__grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  #voorbeeld :is(.cv-demo__tabs button, .cv-demo__word, .cv-demo__replay, .cv-demo__next) {
    transition: background-color 140ms ease, border-color 140ms ease;
  }
}
@media (forced-colors: active) {
  #voorbeeld .cv-demo__tabs button[aria-selected="true"], .cv-demo__grades button[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
  .cv-demo__word, .cv-demo__speech mark { outline: 1px solid Highlight; }
}
