:root {
  color-scheme: dark;
  --background: #101312;
  --panel: #1b1e1c;
  --line: #30332f;
  --text: #f2efe8;
  --muted: #a3aaa1;
  --accent: #e8bd7a;
  --script-size: 58px;
  --guide-offset: 0px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button,
input {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  border-color: #8d8f82;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 90px;
  flex-shrink: 0;
  margin: 0 42px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 2px;
}
.brand-mark {
  color: var(--accent);
  font-size: 17px;
}
.episode-heading {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
h1 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}
.divider {
  color: #5c6259;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.quiet-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 12px;
  color: var(--muted);
}
.quiet-button:hover {
  color: var(--text);
}
.outline-button {
  background: transparent;
  border: 1px solid #51564d;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 12px;
}
.outline-button span:first-child {
  font-size: 16px;
  margin-right: 7px;
}
.studio {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.reading-meta {
  flex-shrink: 0;
  width: min(1100px, calc(100% - 84px));
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.live-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  letter-spacing: 1.5px;
  font-size: 10px;
  min-width: 120px;
}
.status-dot {
  height: 6px;
  width: 6px;
  background: #7d857a;
  border-radius: 100%;
}
body[data-playing="true"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 9px #e8bd7a33;
}
body[data-playing="true"] .live-label {
  color: var(--accent);
}
.section-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
}
.section-button span:last-child {
  margin-left: 8px;
}
.remaining {
  color: var(--muted);
  min-width: 120px;
  text-align: right;
}
.reading-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.reader {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
  scroll-behavior: auto;
}
.reader::-webkit-scrollbar {
  display: none;
}
.reader:focus-visible {
  outline: 1px solid #e8bd7a50;
  outline-offset: -1px;
}
#script {
  width: min(920px, calc(100% - 160px));
  margin: 0 auto;
  padding-top: var(--guide-offset);
  padding-bottom: 65vh;
  font:
    500 var(--script-size) / 1.7 Tahoma,
    Arial,
    sans-serif;
  overflow-wrap: anywhere;
}
#script p {
  margin: 0 0 0.9em;
  white-space: pre-wrap;
}
#script p[dir="ltr"] {
  text-align: left;
  font-family: Arial, sans-serif;
}
#script .section-start {
  padding-top: 1.3em;
}
#script .section-start::before {
  content: attr(data-section);
  display: block;
  font:
    500 13px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 2px;
  color: var(--accent);
  text-align: right;
  margin-bottom: 30px;
}
#script .script-end {
  font:
    500 18px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 3px;
  text-align: center;
  color: var(--accent);
  margin-top: 3em;
  padding: 2em 0;
  border-top: 1px solid var(--line);
}
.focus-guide {
  position: absolute;
  top: var(--guide-offset);
  left: max(24px, calc((100% - 1050px) / 2));
  right: max(24px, calc((100% - 1050px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: calc(var(--script-size) * 1.7);
  color: var(--accent);
  font-size: 40px;
  font-weight: 200;
  pointer-events: none;
  z-index: 1;
}
.reading-stage::before,
.reading-stage::after {
  content: "";
  height: 35px;
  left: 0;
  right: 0;
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.reading-stage::before {
  top: 0;
  background: linear-gradient(var(--background), transparent);
}
.reading-stage::after {
  bottom: 0;
  background: linear-gradient(transparent, var(--background));
}
.mirrored #script,
.mirrored .focus-guide {
  transform: scaleX(-1);
}
.progress-row {
  display: flex;
  width: calc(100% - 84px);
  margin: 14px auto 18px;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.progress-row span {
  min-width: 42px;
}
.progress-row span:last-child {
  text-align: right;
}
input[type="range"] {
  accent-color: var(--accent);
  cursor: pointer;
  height: 20px;
  margin: 0;
  min-width: 0;
  width: 100%;
}
#progress {
  flex: 1;
  height: 14px;
}
.control-area {
  flex-shrink: 0;
  margin: 0 42px;
}
.controls {
  display: flex;
  gap: 35px;
  align-items: center;
  background: var(--panel);
  border: 1px solid #353930;
  padding: 22px 26px;
  border-radius: 13px;
}
.transport {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-right: 24px;
  border-right: 1px solid #3c4037;
}
.icon-button {
  width: 33px;
  height: 42px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 27px;
  color: #c2c6bd;
  border-radius: 7px;
}
.play-button {
  min-width: 138px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 19px;
  border-radius: 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #25241e;
  font-size: 13px;
  font-weight: 650;
}
.play-button:hover {
  background: #f3cf98;
}
.setting {
  flex: 1;
  min-width: 110px;
  max-width: 260px;
}
.setting label {
  font-size: 11px;
  color: #e1e3dc;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.setting output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  align-items: center;
  height: 12px;
}
.big-a {
  font-size: 13px;
}
.reading-options {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.option-button {
  background: transparent;
  border: 1px solid #42473d;
  border-radius: 7px;
  padding: 13px 12px;
  font-size: 11px;
  white-space: nowrap;
}
.option-button span {
  margin-right: 5px;
}
.option-button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: #e8bd7a10;
}
.keyboard-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 46px;
  font-size: 10px;
  color: #9ca396;
}
.keyboard-help span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.keyboard-help span:last-child {
  margin-left: auto;
}
kbd {
  font-family: inherit;
  border: 1px solid #3c4137;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
}
.countdown {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-content: center;
  background: #101312e8;
  color: var(--accent);
  font-size: 110px;
  font-weight: 300;
}
.scene-mode .topbar,
.scene-mode .reading-meta,
.scene-mode .control-area,
.scene-mode .progress-row {
  display: none;
}
.show-controls {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 10;
  background: #20231ff0;
  border: 1px solid #525748;
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
  padding: 10px 13px;
  opacity: 0.3;
}
.show-controls:hover,
.show-controls:focus-visible {
  opacity: 1;
}
.notice {
  position: fixed;
  bottom: 180px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 20px;
  border: 1px solid #565b4f;
  border-radius: 8px;
  background: #292d25;
  font-size: 13px;
  z-index: 30;
  max-width: 90%;
}
dialog {
  background: #1b1e1b;
  border: 1px solid #454b3f;
  border-radius: 16px;
  color: var(--text);
  padding: 28px;
  width: min(650px, calc(100% - 32px));
  max-height: 85dvh;
  box-shadow: 0 25px 100px #0008;
}
dialog::backdrop {
  background: #030603b5;
  backdrop-filter: blur(7px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
}
h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 9px 0;
}
.close-button {
  background: transparent;
  border: 1px solid #444b3d;
  border-radius: 6px;
  width: 34px;
  height: 34px;
  font-size: 25px;
}
.dialog-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0 22px;
}
.section-list {
  display: grid;
  gap: 8px;
}
.section-link {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 15px;
  background: #242922;
  border: 1px solid #353c2f;
  border-radius: 8px;
  text-align: left;
}
.section-link .number {
  color: var(--accent);
  font-size: 12px;
}
.section-link .excerpt {
  font:
    17px/1.5 Tahoma,
    Arial,
    sans-serif;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  text-align: right;
}
.edit-dialog {
  width: min(900px, calc(100% - 32px));
}
textarea {
  width: 100%;
  resize: vertical;
  height: 44dvh;
  min-height: 130px;
  padding: 18px;
  background: #101310;
  border: 1px solid #4c5544;
  border-radius: 8px;
  font:
    22px/1.8 Tahoma,
    Arial,
    sans-serif;
  color: var(--text);
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
@media (min-width: 1500px) {
  #script {
    width: min(1100px, calc(100% - 220px));
  }
  .focus-guide {
    left: calc((100% - 1250px) / 2);
    right: calc((100% - 1250px) / 2);
  }
}
@media (max-width: 1050px) {
  .controls {
    gap: 20px;
    padding: 18px;
  }
  .transport {
    padding-right: 15px;
    gap: 7px;
  }
  .reading-options {
    flex-direction: column;
  }
  .option-button {
    padding: 8px;
  }
  .keyboard-help span:last-child {
    display: none;
  }
  .keyboard-help {
    gap: 18px;
  }
  .topbar {
    gap: 22px;
  }
}
@media (max-width: 720px) {
  .topbar {
    height: 70px;
    margin: 0 18px;
    gap: 16px;
  }
  .brand {
    font-size: 10px;
    gap: 7px;
    letter-spacing: 1px;
  }
  .episode-heading {
    gap: 5px;
  }
  h1 {
    font-size: 13px;
  }
  #word-count,
  .divider,
  #edit-button {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .outline-button {
    padding: 8px 9px;
    font-size: 10px;
  }
  .outline-button span:first-child {
    margin: 0;
  }
  .reading-meta {
    width: calc(100% - 36px);
    height: 46px;
  }
  .live-label {
    min-width: 85px;
    font-size: 8px;
    letter-spacing: 0.8px;
  }
  .remaining {
    font-size: 10px;
    min-width: 80px;
  }
  .section-button {
    font-size: 10px;
    padding: 6px;
  }
  #script {
    width: calc(100% - 70px);
  }
  .focus-guide {
    left: 8px;
    right: 8px;
    font-size: 30px;
  }
  .progress-row {
    width: calc(100% - 36px);
    margin: 8px auto 12px;
  }
  .control-area {
    margin: 0 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    padding: 15px;
  }
  .transport {
    border: 0;
    padding: 0;
    grid-row: 2;
  }
  .play-button {
    min-width: 110px;
    padding: 12px 10px;
    font-size: 12px;
    gap: 8px;
  }
  .setting {
    max-width: none;
    min-width: 0;
  }
  .reading-options {
    grid-row: 2;
    flex-direction: row;
    justify-self: end;
    gap: 5px;
  }
  .option-button {
    font-size: 10px;
    padding: 9px 7px;
  }
  .option-button span {
    display: none;
  }
  .keyboard-help {
    display: none;
  }
  .dialog-actions {
    flex-direction: column-reverse;
  }
  h2 {
    font-size: 18px;
  }
  dialog {
    padding: 20px;
  }
}
@media (max-height: 550px) and (min-width: 721px) {
  .topbar {
    height: 55px;
  }
  .reading-meta {
    height: 35px;
  }
  .controls {
    padding: 12px 20px;
  }
  .keyboard-help {
    min-height: 30px;
  }
  .progress-row {
    margin: 5px auto 10px;
  }
}
@media (max-width: 720px) {
  #edit-button {
    display: block;
    font-size: 0;
    padding: 7px;
  }
  #edit-button::after {
    content: "Texte";
    font-size: 10px;
  }
  .topbar {
    gap: 10px;
  }
}
@media (max-height: 550px) and (max-width: 720px) {
  .topbar {
    height: 43px;
  }
  .reading-meta {
    height: 30px;
  }
  .controls {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
  }
  .transport {
    gap: 2px;
  }
  .transport .icon-button {
    width: 22px;
    height: 30px;
    font-size: 22px;
  }
  .play-button {
    min-width: 85px;
    padding: 10px 8px;
    font-size: 10px;
    gap: 5px;
  }
  .setting {
    min-width: 50px;
  }
  .setting label {
    font-size: 9px;
    margin-bottom: 2px;
  }
  .range-ends,
  .reading-options {
    display: none;
  }
  .progress-row {
    margin: 4px auto 8px;
  }
  .control-area {
    padding-bottom: 7px;
  }
}
