/* ==========================================================================
   Palco Roteiro Web — Estúdio do Dramaturgo (Fase 1 - MVP)
   Interface Escura de Estúdio + Folha de Papel Branca (com modo escuro opcional)
   Impressão / Exportação PDF 100% em fundo branco e texto escuro
   ========================================================================== */

:root {
  --studio-bg: #0b0b0e;
  --studio-surface: #14141a;
  --studio-surface-2: #1e1e26;
  --studio-surface-3: #282833;
  --studio-border: rgba(255, 255, 255, 0.1);
  --studio-text: #f5f5f7;
  --studio-muted: #9ca3af;

  --primary-light: #0052cc;
  --primary-dark: #eb8018;
  --primary: var(--primary-dark);
  --accent-blue: #2563eb;
  --accent-green: #16a34a;
  --accent-red: #dc2626;

  /* Folha de Papel (Branca por padrão na tela) */
  --paper-bg: #ffffff;
  --paper-text: #111827;
  --paper-muted: #4b5563;
  --paper-border: #e5e7eb;
  --paper-highlight: #fef08a;
  --paper-highlight-border: #eab308;

  --script-font: 'Courier Prime', 'Courier New', Courier, monospace;
  --script-size: 16px;

  --scrollbar-thumb: #3a3a46;
  --scrollbar-track: #14141a;

  color-scheme: light dark;
  accent-color: var(--primary);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@media (prefers-color-scheme: light) {
  :root {
    --primary: var(--primary-dark);
  }
}

@supports (color: light-dark(white, black)) {
  :root {
    --primary: light-dark(var(--primary-light), var(--primary-dark));
    --scrollbar-thumb: light-dark(#555555, #3a3a46);
    --scrollbar-track: light-dark(#1a1a1a, #14141a);
  }
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

@supports not (accent-color: #eb8018) {
  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }
  input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--primary) var(--progress, 50%), #282833 var(--progress, 50%));
    border-radius: 4px;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -5px;
  }
}

/* Quando o usuário ativa o Modo Folha Escura (apenas na tela) */
body.paper-dark {
  --paper-bg: #16161d;
  --paper-text: #f3f4f6;
  --paper-muted: #9ca3af;
  --paper-border: rgba(255, 255, 255, 0.12);
  --paper-highlight: rgba(235, 128, 24, 0.24);
  --paper-highlight-border: #eb8018;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100dvh;
  background: var(--studio-bg);
  color: var(--studio-text);
  font-family: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Native <dialog> Rules (Modern Web Guidance compliant)
   ========================================================================== */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

dialog[open] {
  display: flex;
  flex-direction: column;
  margin: auto;
  background: var(--studio-surface);
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
  border-radius: 18px;
  padding: 22px;
  width: min(94vw, 620px);
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   ZONA 1: Barra Superior (Menu Principal)
   ========================================================================== */
.topbar {
  height: 56px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 10px;
  flex-shrink: 0;
  z-index: 30;
}

.topbar__left,
.topbar__center,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--primary);
  white-space: nowrap;
}

.play-title-input {
  background: var(--studio-surface-2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--studio-text);
  width: min(240px, 32vw);
  outline: none;
}

.play-title-input:focus {
  border-color: var(--primary);
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--studio-muted);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--studio-text);
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--studio-surface-3);
}

.btn--primary {
  background: var(--primary);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

.btn--primary:hover {
  opacity: 0.92;
  background: var(--primary);
}

.btn.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(235, 128, 24, 0.14);
}

/* ==========================================================================
   ZONA 2: Barra de Ferramentas de Escrita & Estrutura Teatral
   ========================================================================== */
.toolbar {
  min-height: 48px;
  background: var(--studio-surface-2);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  z-index: 25;
}

.toolbar__group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar__divider {
  width: 1px;
  height: 24px;
  background: var(--studio-border);
  margin: 0 4px;
}

.tool-select,
.tool-input {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  color: var(--studio-text);
  outline: none;
}

.tool-select:focus,
.tool-input:focus {
  border-color: var(--primary);
}

.tool-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tool-btn:hover {
  background: var(--studio-surface-3);
}

.tool-btn.is-active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

/* Modo Foco: oculta barras secundárias e gaveta lateral */
body.focus-mode .toolbar,
body.focus-mode .side-drawer {
  display: none !important;
}

/* ==========================================================================
   ZONA 3 & 4: Workspace (Folha Central + Gaveta Lateral Direita)
   ========================================================================== */
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.editor-stage {
  flex: 1;
  overflow-y: auto;
  padding: 28px 16px 80px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.paper-sheet {
  width: min(100%, 816px); /* Largura padrão A4/Carta em 96dpi */
  min-height: 1056px;
  height: auto;
  flex-shrink: 0;
  background: var(--paper-bg);
  color: var(--paper-text);
  border: 1px solid var(--paper-border);
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  padding: 56px 64px 72px 64px;
  font-family: var(--script-font);
  font-size: var(--script-size);
  line-height: 1.6;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 720px) {
  .paper-sheet {
    padding: 28px 20px 56px 20px;
  }
}

/* Folha de Rosto / Cabeçalho Dramatúrgico */
.frontmatter {
  border-bottom: 2px dashed var(--paper-border);
  padding-bottom: 24px;
  margin-bottom: 28px;
  text-align: center;
}

.frontmatter__title {
  font-size: 1.65em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.frontmatter__subtitle {
  font-size: 1em;
  font-style: italic;
  color: var(--paper-muted);
  margin-bottom: 10px;
}

.frontmatter__authors {
  font-size: 0.95em;
  font-weight: 700;
  margin-bottom: 12px;
}

.frontmatter__synopsis {
  font-size: 0.9em;
  color: var(--paper-muted);
  max-width: 600px;
  margin: 0 auto 14px auto;
  text-align: left;
}

.frontmatter__cast {
  text-align: left;
  background: rgba(128, 128, 128, 0.07);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.88em;
}

.frontmatter__cast-title {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85em;
  margin-bottom: 6px;
}

/* Linhas Estruturadas do Texto Teatral */
.script-editor {
  outline: none;
  min-height: 680px;
}

.script-line {
  position: relative;
  min-height: 1.6em;
  padding: 2px 6px;
  border-radius: 4px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.script-line:focus-within,
.script-line.is-current {
  background: rgba(235, 128, 24, 0.07);
}

/* 1. ATO / CENA */
.script-line[data-type="act"] {
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.2em;
  letter-spacing: 0.06em;
  margin-top: 24px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--paper-border);
  padding-bottom: 4px;
}

/* 2. NOME DO PERSONAGEM (Indentado / Centralizado em CAIXA ALTA) */
.script-line[data-type="character"] {
  margin-top: 16px;
  margin-left: 32%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 3. RUBRICA / DIDASCÁLIA (Recuada, em itálico) */
.script-line[data-type="parenthetical"] {
  margin-left: 18%;
  margin-right: 10%;
  font-style: italic;
  color: var(--paper-muted);
}

/* 4. FALA / DIÁLOGO */
.script-line[data-type="dialogue"] {
  margin-left: 0;
  margin-bottom: 6px;
}

/* 5. MARCAÇÃO TÉCNICA (Luz, Som, Pausa) */
.script-line[data-type="tech"] {
  text-align: right;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9em;
  color: var(--accent-blue);
  margin: 10px 0;
}

/* Destaque do Personagem Selecionado ("Destacar Meu Personagem") */
.script-line.is-highlighted-char {
  background: var(--paper-highlight) !important;
  border-left: 4px solid var(--paper-highlight-border);
  padding-left: 10px;
}

/* Popup Autocomplete de Personagens */
.char-autocomplete {
  position: fixed;
  z-index: 100;
  background: var(--studio-surface);
  color: var(--studio-text);
  border: 1px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
  padding: 4px;
  min-width: 190px;
  max-height: 220px;
  overflow-y: auto;
}

.char-autocomplete__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.char-autocomplete__item:hover,
.char-autocomplete__item.is-selected {
  background: var(--primary);
  color: #000;
}

/* Barra de Status Inferior da Folha */
.status-bar {
  height: 34px;
  background: var(--studio-surface);
  border-top: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  color: var(--studio-muted);
  flex-shrink: 0;
}

/* ==========================================================================
   ZONA 4: Gaveta Lateral Direita (Métricas & Cenas)
   ========================================================================== */
.side-drawer {
  width: 360px;
  background: var(--studio-surface);
  border-left: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .side-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    box-shadow: -12px 0 36px rgba(0, 0, 0, 0.7);
  }
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--studio-border);
  background: var(--studio-surface-2);
}

.drawer-tab {
  flex: 1;
  padding: 11px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--studio-muted);
  border-bottom: 2px solid transparent;
  text-align: center;
}

.drawer-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--studio-surface);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metric-card {
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-card__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--studio-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 10px;
}

.stat-box__val {
  font-size: 18px;
  font-weight: 800;
  color: var(--studio-text);
}

.stat-box__lbl {
  font-size: 11px;
  color: var(--studio-muted);
}

.metric-help-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.metric-help-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.char-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.char-bar-row:last-child {
  border-bottom: none;
}

.char-bar-track {
  width: 100%;
  height: 7px;
  background: var(--studio-surface);
  border-radius: 999px;
  overflow: hidden;
}

.char-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

/* ==========================================================================
   FASE 2: Inspetor de Padrão, Nuvem de Palavras, Escaleta & Snapshots
   ========================================================================== */
.inspector-item {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.inspector-item:hover {
  background: var(--studio-surface-3);
}

.inspector-item--error {
  border-left-color: #ef4444;
}

.inspector-item--warn {
  border-left-color: #eab308;
}

.inspector-item--info {
  border-left-color: #38bdf8;
}

.inspector-check-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border);
  color: #4ade80;
  font-weight: 800;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inspector-check-btn:hover {
  background: rgba(74, 222, 128, 0.18);
  border-color: #4ade80;
}

.word-cloud-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  padding: 10px;
  background: var(--studio-surface);
  border-radius: 8px;
  min-height: 90px;
}

.word-cloud-tag {
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.12s ease;
}

.word-cloud-tag:hover {
  transform: scale(1.1);
}

.scene-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-card.is-dragging {
  opacity: 0.5;
}

@keyframes flashLine {
  0% { background: rgba(235, 128, 24, 0.45); }
  100% { background: transparent; }
}

.script-line.is-flashed {
  animation: flashLine 1.4s ease;
}

/* Linha seguida ao vivo no Modo Leitura de Mesa */
.script-line.is-table-read-line {
  outline: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.16) !important;
}

/* ==========================================================================
   FASE 4: Sala de Criação Coletiva (Chat, 3 Modos de Áudio & Visão Convidado)
   ========================================================================== */
.chat-messages-box {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 8px;
  height: clamp(260px, 46dvh, 480px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-bubble--mine {
  border-color: rgba(235, 128, 24, 0.45);
  background: rgba(235, 128, 24, 0.1);
}

.chat-bubble--reaction {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.chat-bubble__meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--studio-muted);
  font-weight: 700;
}

.chat-audio-player {
  width: 100%;
  height: 32px;
  margin-top: 2px;
}

.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.ptt-btn {
  background: #1e293b;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.ptt-btn.is-recording {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
  animation: pulseRec 0.9s infinite alternate;
}

@keyframes pulseRec {
  from { opacity: 1; }
  to { opacity: 0.65; }
}

/* Barra Exclusiva do Modo Convidado (3 Abas: Texto ao Vivo, Chat & Áudio, Métricas) */
.guest-topbar {
  background: #111827;
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 35;
}

.guest-tabs {
  display: flex;
  gap: 6px;
}

.guest-tab {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--studio-surface-2);
  color: var(--studio-muted);
  border: 1px solid var(--studio-border);
}

.guest-tab.is-active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

body.is-guest-mode .topbar,
body.is-guest-mode .toolbar,
body.is-guest-mode #btn-edit-frontmatter {
  display: none !important;
}

body.is-guest-mode[data-guest-tab="text"] .side-drawer {
  display: none !important;
}

body.is-guest-mode[data-guest-tab="chat"] .editor-stage,
body.is-guest-mode[data-guest-tab="metrics"] .editor-stage {
  display: none !important;
}

body.is-guest-mode[data-guest-tab="chat"] .side-drawer,
body.is-guest-mode[data-guest-tab="metrics"] .side-drawer {
  display: flex !important;
  position: static !important;
  width: min(100%, 720px) !important;
  margin: 0 auto;
  border: none;
}

body.is-guest-mode .drawer-tabs {
  display: none !important;
}

/* Formulários dos Modais */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--studio-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--studio-bg);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--studio-text);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
}

/* Toast / Snackbar */
.snackbar {
  position: fixed;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.snackbar.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   REGRA DE OURO PARA IMPRESSÃO / EXPORTAÇÃO PDF:
   Mesmo que a folha esteja no modo escuro na tela, o PDF sai SEMPRE com
   fundo branco (#FFFFFF) e texto escuro (#000000)!
   ========================================================================== */
@media print {
  @page {
    size: A4;
    margin: 20mm 18mm 20mm 22mm;
  }

  html,
  body,
  body.paper-dark {
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    --paper-bg: #ffffff !important;
    --paper-text: #000000 !important;
    --paper-muted: #374151 !important;
    --paper-border: #d1d5db !important;
    --paper-highlight: #fef08a !important;
    --paper-highlight-border: #ca8a04 !important;
  }

  .topbar,
  .toolbar,
  .guest-topbar,
  .guest-download-bar,
  .side-drawer,
  .status-bar,
  .char-autocomplete,
  .snackbar,
  dialog {
    display: none !important;
  }

  .workspace,
  .editor-stage,
  body.is-guest-mode .editor-stage {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .paper-sheet {
    width: 100% !important;
    min-height: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .script-line {
    page-break-inside: avoid;
    color: #000000 !important;
  }

  .script-line.is-highlighted-char {
    background: #fef08a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

