@layer ksExerciseAudio {
  #view :is(.ks-wave-native,.ks-wave-legacy) {display: none !important}
  #view .ks-wave-player {
    --wave-idle: #d5e9e1;
    --wave-active: #338366;
    display: grid !important;
    grid-template-columns: auto minmax(65px,1fr) max-content auto;
    align-items: center;
    gap: 8px 13px;
    width: min(100%, 46rem);
    box-sizing: border-box;
    margin: 12px 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #2e6955;
  }
  #view .ks-wave-player :is(.ks-wave-play,.ks-wave-mute,.ks-wave-speed) {
    display: inline-grid !important;
    place-items: center;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #28634e !important;
    cursor: pointer;
  }
  #view .ks-wave-player .ks-wave-play {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #e2f3eb !important;
  }
  #view .ks-wave-play::before {
    content: "";
    border: solid transparent;
    border-width: 7px 0 7px 10px;
    border-left-color: currentColor;
    margin-left: 2px;
  }
  #view .ks-wave-play[data-playing="true"]::before {
    height: 12px;
    width: 5px;
    box-sizing: content-box;
    margin: 0;
    border: solid currentColor;
    border-width: 0 2px;
  }
  #view .ks-wave-track {position: relative; height: 34px; min-width: 0}
  #view .ks-wave-bars {
    position: absolute;
    inset: 1px 0;
    display: grid;
    grid-template-columns: repeat(56,minmax(0,1fr));
    align-items: center;
    gap: clamp(1px,.32vw,3px);
    pointer-events: none;
  }
  #view .ks-wave-bars i {
    display: block;
    height: var(--wave-height, 42%);
    min-height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right,var(--wave-active) 0 var(--wave-fill,0%),var(--wave-idle) var(--wave-fill,0%) 100%);
  }
  #view .ks-wave-player .ks-wave-seek {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    cursor: pointer;
  }
  #view .ks-wave-track:focus-within,
  #view :is(.ks-wave-player,.ks-vocab-save-row) :focus-visible {outline: 2px solid #388470; outline-offset: 3px; border-radius: 5px}
  #view .ks-wave-clock {font-variant-numeric: tabular-nums; color: #425750; font-size: .815rem; white-space: nowrap}
  #view .ks-wave-controls {display: flex; align-items: center; gap: 8px}
  #view .ks-wave-player .ks-wave-mute {width: 32px !important; min-width: 32px !important; height: 34px; background: transparent !important; font-size: 1rem}
  #view .ks-wave-player .ks-wave-volume {accent-color: #398365; margin: 0 !important; padding: 0 !important; width: 58px !important; min-width: 0 !important}
  #view .ks-wave-player .ks-wave-speed {font: inherit; font-size: .8rem; height: 34px; min-width: 49px; padding-inline: 6px !important; border-radius: 8px !important; background: #eff7f3 !important}
  #view .ks-wave-error {grid-column: 1/-1; color: #952a3d}
  #view .ks-wave-error:empty {display: none}
  @media (max-width: 720px) {
    #view .ks-wave-player {grid-template-columns: auto minmax(65px,1fr) max-content; gap: 6px 9px}
    #view .ks-wave-controls {grid-column: 2/-1; justify-content: end}
  }
  #view details > .ks-transcript-title {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    width: fit-content !important;
    max-width: 100%;
    cursor: pointer !important;
    list-style: none !important;
  }
  #view .ks-transcript-title::marker {content: "" !important}
  #view .ks-transcript-title::-webkit-details-marker,
  #view details > .ks-transcript-title::before,
  #view details > .ks-transcript-title::after {display: none !important; content: none !important}
  #view .ks-transcript-chevron {
    display: grid; place-items: center; flex: none;
    width: 17px; height: 17px; border-radius: 50%;
    background: #e8f5ee; color: #357d62;
  }
  #view .ks-transcript-chevron::after {
    content: ""; width: 5px; height: 5px; border: solid currentColor;
    border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg);
  }
  #view details[open] > summary .ks-transcript-chevron::after {transform: translateY(1px) rotate(225deg)}
  #view .ks-exercise-reference {
    background: #f5f9f7 !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #233a31 !important;
  }
  #view .ks-exercise-reference mark {background: #e0f2e9 !important; color: #245744 !important; border-radius: 4px}
  #view .ks-vocab-save-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 32px;
    gap: 2px 8px;
    align-items: center;
  }
  #view .ks-vocab-save-row :is(dt,dd,.ks-vocab-save-copy) {grid-column: 1; margin-inline: 0 !important; overflow-wrap: anywhere}
  #view .ks-vocab-save-row dd::before {content: none !important}
  #view .ks-vocab-save-row .ks-save-word {grid-column: 2; grid-row: 1 / span 2}
  #view :is(.ks-vocab-save-row,.ks-extra-saved) .ks-save-word {
    width: 32px !important; min-width: 32px !important; height: 32px !important;
    display: grid !important; place-items: center;
    box-sizing: border-box; padding: 0 !important; margin: 0 !important;
    border: 1px solid #c7ded2 !important; border-radius: 9px !important;
    background: #fff !important; color: #58776a !important;
    box-shadow: none !important; font: 600 15px/1 system-ui; cursor: pointer;
  }
  #view :is(.ks-vocab-save-row,.ks-extra-saved) .ks-save-word[aria-pressed="true"] {
    border-color: #b1d7c5 !important; background: #dff2e8 !important; color: #247053 !important;
  }
}

@layer ksExerciseAudio {
  #view .ks-vocab-bulk-hidden {display: none !important}
  #view .ks-vocab-save-row {list-style: none !important; column-gap: 12px !important}
  #view .ks-vocab-save-row::before,
  #view .ks-vocab-save-row::marker,
  #view .ks-vocab-save-row :is(.ks-vocab-save-copy,.ks-vocab-word,.ks-vocab-meaning)::before {
    content: none !important;
    display: none !important;
  }
  #view .ks-vocab-save-row .ks-vocab-save-copy {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    line-height: 1.45;
  }
  #view .ks-vocab-save-row .ks-vocab-word {font-weight: 650}
  #view .ks-vocab-save-row .ks-vocab-meaning {font-weight: 400}
  #view :is(.ks-vocab-save-row,.word) .ks-save-word,
  .ks-dictionary-dialog .ks-dictionary-choice .ks-save-check {
    display: grid !important;
    place-items: center;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: 1px solid #c4d9d0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #357e63 !important;
    box-shadow: none !important;
  }
  .ks-save-check {display: inline-grid; place-items: center}
  .ks-save-check::after {
    content: "";
    box-sizing: border-box;
    width: 11px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    border-radius: 1px;
    transform: translateY(-1px) rotate(-45deg);
    opacity: .48;
  }
  #view .ks-save-word[aria-pressed="true"], .ks-dictionary-choice[aria-pressed="true"] .ks-save-check {
    border-color: #9bcbb6 !important;
    background: #e1f3ea !important;
    color: #308264 !important;
  }
  [aria-pressed="true"] > .ks-save-check::after {opacity: 1}
  #view .ks-save-word:is(:hover,:focus-visible) .ks-save-check::after {opacity: .65}
  #view .ks-save-word[aria-pressed="true"]:is(:hover,:focus-visible) .ks-save-check::after {opacity: 1}
  #view .ks-dictionary-filter {max-width: 100%; margin: 0 0 12px; color: #294b40}
}
.ks-dictionary-dialog {
  width: min(370px, calc(100% - 34px));
  max-height: 85vh;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid #d7e8df;
  border-radius: 18px;
  background: #fff;
  color: #233a31;
  box-shadow: 0 16px 54px #183c3424;
}
.ks-dictionary-dialog::backdrop {background: rgb(28 54 44 / 20%)}
.ks-dictionary-head {display: flex; justify-content: space-between; align-items: center; gap: 12px}
.ks-dictionary-head h2 {margin: 0; font-size: 1.16rem}
.ks-dictionary-term {margin: 4px 0 14px; color: #557169}
.ks-dictionary-choices {display: grid; gap: 6px; max-height: 235px; overflow: auto}
.ks-dictionary-dialog :is(button,input) {font: inherit}
.ks-dictionary-dialog button {cursor: pointer}
.ks-dictionary-dialog .ks-dictionary-choice {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; padding: 6px 8px; border: 1px solid #e1ece6; border-radius: 10px;
  background: #f8fbf9; color: #233a31; text-align: left; overflow-wrap: anywhere;
}
.ks-dictionary-choices .ks-save-check {flex: none}
.ks-dictionary-dialog :is(.ks-dictionary-close,.ks-dictionary-create button) {
  padding: 6px 10px; border: 1px solid #c7ded2; border-radius: 8px;
  background: #edf6f1; color: #28634e;
}
.ks-dictionary-create {display: flex; gap: 7px; margin-top: 12px}
.ks-dictionary-create input {flex: 1; min-width: 0; padding: 7px; border: 1px solid #d6e7df; border-radius: 8px}
.ks-dictionary-error {display: block; color: #952a3d; margin-top: 8px}
.ks-dictionary-error:empty {display: none}

@layer ksExerciseAudio {#view .ks-dictionary-filter[hidden] {display: none !important}}

@layer ksExerciseAudio {
  .ks-dictionary-dialog .ks-dictionary-create input {
    border: 1px solid #d6e7df !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .ks-dictionary-dialog .ks-dictionary-create input:focus {
    border-color: #91c0aa !important;
    outline: none !important;
    box-shadow: 0 0 0 2px #e1f3ea !important;
  }
  #view .ks-assembly-check {
    display: inline-grid !important;
    place-items: center;
    width: 1em;
    height: 1em;
    min-width: 16px;
    min-height: 16px;
    vertical-align: -.19em;
    color: #308264 !important;
    font-size: 1rem !important;
    letter-spacing: 0;
    overflow: hidden;
    position: relative;
    text-indent: -999px;
  }
  #view .ks-assembly-check::after {
    content: "";
    position: absolute;
    inset: 4px auto auto 2px;
    width: 11px;
    height: 6px;
    box-sizing: border-box;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    border-radius: 1px;
    transform: rotate(-45deg);
  }
}
