.relisten {
  color: #263b36;
  background: #f1f6f3;
  border: 1px solid #cbdad2;
  border-radius: 14px;
  padding: 18px;
  margin-block: 18px;
}
.relisten[hidden], .relisten [hidden] { display: none !important; }
.relisten h2 { margin: 0 0 8px; font-size: 1.2rem; }
.relisten p { margin: 8px 0; }
.relisten-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.relisten button {
  background: #fff;
  border: 1px solid #aebfb6;
  color: inherit;
  border-radius: 8px;
  padding: 7px 11px;
  min-height: 36px;
  cursor: pointer;
}
.relisten .relisten-primary { color: #fff; background: #28604e; border-color: #28604e; }
.sentence-relisten, .chapter-gist {
  display: inline-block;
  color: #365d4e;
  background: #eef4f0;
  border: 1px solid #cfdfd5;
  border-radius: 5px;
  margin-inline: 2px 5px;
  padding: 0 5px;
  vertical-align: middle;
  font: 12px/24px system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.sentence-relisten[aria-pressed="true"] { color: #fff; background: #28604e; }
.mode-exam #paper .paper-exam__mod:not(.is-graded) .sentence-relisten,
.mode-wrong #paper .paper-exam__mod:not(.is-graded) .sentence-relisten { display: none; }
@media (pointer: coarse) {
  .sentence-relisten, .chapter-gist { line-height: 32px; }
  .relisten button { min-height: 44px; }
}

.relisten-mark-dialog {
  width: min(550px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  box-sizing: border-box;
  margin: auto;
}
.relisten-mark-dialog::backdrop { background: #14241e66; }
.relisten-mark-sentence {
  padding: 12px;
  margin-block: 14px;
  background: #fff;
  border: 1px solid #cbdad2;
  border-radius: 8px;
  font: 1.2rem/1.9 system-ui, sans-serif;
  user-select: none;
}
.relisten-mark-sentence button {
  border: 0;
  border-radius: 3px;
  padding: 0 2px;
  min-height: 30px;
  font: inherit;
  user-select: none;
}
.relisten-mark-sentence button[aria-pressed="true"] {
  color: #164a35;
  background: #d7ebde;
  text-decoration: underline 2px;
  text-underline-offset: 4px;
}
.relisten-mark-dialog button:disabled { opacity: .55; cursor: default; }

.relisten [data-source] { color: #4a6158; font-size: .9rem; margin-top: 13px; }
.relisten [data-answer] { background: #fff; border-radius: 8px; padding: 10px 12px; }
.relisten [data-original] { font-size: 1.1rem; line-height: 1.8; }
.relisten [data-original] u {
  color: #164a35;
  background: #d7ebde;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.relisten-library {
  width: min(550px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  box-sizing: border-box;
  margin: auto;
}
.relisten-library::backdrop { background: #14241e66; }
.relisten-library input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  font: inherit;
  font-size: 16px;
  border: 1px solid #aebfb6;
  border-radius: 8px;
}
.relisten [data-library-list] { max-height: 45vh; overflow: auto; margin-top: 12px; }
.relisten [data-library-list] > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 5px;
}
.relisten [data-library-list] span { color: #4a6158; font-size: .85rem; }

.relisten-gist label { display: grid; gap: 6px; margin-top: 14px; }
.relisten-gist textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px;
  border: 1px solid #aebfb6;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: #fff;
  resize: vertical;
}
.relisten-gist details { margin-block: 12px; }
.relisten-gist details div { max-height: 26vh; overflow: auto; padding: 0 8px; }
.relisten-gist summary { cursor: pointer; }
.relisten button[data-loop][aria-pressed="true"] {
  background: #28604e;
  border-color: #28604e;
  color: #fff;
}
.relisten [data-review-result] { color: #365d4e; font-size: .9rem; }