#subtitle-container {
    max-height: 9em; /* Adjust this value based on the font size and line height */
    overflow-y: auto;
    white-space: pre-wrap;

    margin: 1px 0;
  font-size: 18px;
  line-height: 1.5;
  word-wrap: break-word;
}
.highlight {
    background-color: #5532A2;
    color: #ffffff; /* Make the text color white for better readability */
    border-radius: 20px; /* Add curved corners */
    padding: 4px 7px; /* Add padding for a better appearance */

}

/* HARD_BURN_DIALOG_DESIGN_START — shared desktop/mobile and RTL/LTR controls. */
.hard-burn-dialog { --burn-accent:#6336b5; --burn-border:#dce1eb; --burn-muted:#5c6577; }
.hard-burn-dialog .modal-dialog { width:calc(100% - 40px); max-width:1360px; margin:28px auto; }
.hard-burn-dialog .modal-content { max-height:calc(100vh - 56px); max-height:calc(100dvh - 56px); overflow:hidden; border:0; border-radius:16px; box-shadow:0 24px 80px rgba(15,23,42,.24); color:#202738; background:#fff; }
.hard-burn-dialog .modal-header { flex:0 0 auto; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid #e9ecf2; }
.hard-burn-dialog .modal-title { margin:0; font-size:20px; line-height:1.55; font-weight:600; }
.hard-burn-dialog .close { float:none; flex:0 0 36px; display:grid; place-items:center; width:36px; height:36px; margin:0; margin-inline-start:auto; padding:0; border-radius:9px; font-size:26px; color:#566176; opacity:1; text-shadow:none; background:#f2f4f8; }
.hard-burn-dialog .close:hover { color:#252d3f; background:#e9ecf3; }
.hard-burn-dialog .modal-body { padding:24px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.hard-burn-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr); align-items:start; gap:28px; }
.hard-burn-preview { position:sticky; top:0; min-width:0; }
.hard-burn-preview-title { margin-bottom:12px; color:var(--burn-muted); font-size:13px; font-weight:600; }
.hard-burn-dialog #image-wrapper { display:flex; align-items:center; justify-content:center; position:relative; width:100%; aspect-ratio:16/9; min-height:140px; overflow:hidden; border-radius:12px; background:#111827; }
.hard-burn-dialog #preview-image { width:100%; height:auto; max-width:100%; max-height:65vh; object-fit:contain; }
.hard-burn-dialog #loading-text { position:absolute; inset:0; z-index:1; align-content:center; padding:20px; font-size:14px; line-height:1.6; text-align:center; color:#fff; background:rgba(17,24,39,.7); }
.hard-burn-form { min-width:0; font-size:15px; line-height:1.6; }
.hard-burn-dialog .form-group { min-width:0; margin-bottom:18px; }
.hard-burn-dialog .form-group > label { display:block; margin-bottom:7px; font-size:14px; font-weight:500; line-height:1.6; }
.hard-burn-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:16px; }
.hard-burn-size-animation { grid-template-columns:minmax(76px,.48fr) minmax(0,1fr); }
.hard-burn-dialog .form-control { width:100%; min-width:0; min-height:46px; height:auto; padding:10px 12px; border:1px solid var(--burn-border); border-radius:9px; color:#273247; background-color:#fff; font-size:15px; line-height:1.6; box-shadow:none; }
.hard-burn-dialog select.form-control { -webkit-appearance:none; appearance:none; padding-inline-end:32px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23657287' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; }
.hard-burn-dialog[dir="rtl"] select.form-control { background-position:left 10px center; }
.hard-burn-dialog .form-control:focus { border-color:var(--burn-accent); outline:0; box-shadow:0 0 0 3px rgba(99,54,181,.13); }
.hard-burn-dialog .form-control:disabled { color:#6c7585; background-color:#f2f4f8; opacity:1; }
.hard-burn-field-note { display:block; margin-top:6px; color:var(--burn-muted); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.hard-burn-field-note:empty { display:none; }
.hard-burn-color-control { display:flex; align-items:center; min-width:0; border:1px solid var(--burn-border); border-radius:9px; background:#fff; }
.hard-burn-color-control:focus-within { border-color:var(--burn-accent); box-shadow:0 0 0 3px rgba(99,54,181,.13); }
.hard-burn-color-control .form-control { flex:1 1 auto; width:0; border:0; padding-inline-start:9px; min-height:44px; }
.hard-burn-color-control .form-control:focus { box-shadow:none; }
.hard-burn-swatch-checker { display:block; flex:0 0 24px; width:24px; height:24px; margin-inline-start:11px; overflow:hidden; border:1px solid rgba(50,60,80,.22); border-radius:6px; background-color:#fff; background-image:linear-gradient(45deg,#d5d9e1 25%,transparent 25%),linear-gradient(-45deg,#d5d9e1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d5d9e1 75%),linear-gradient(-45deg,transparent 75%,#d5d9e1 75%); background-size:8px 8px; background-position:0 0,0 4px,4px -4px,-4px 0; }
.hard-burn-swatch-checker > span { display:block; width:100%; height:100%; }
.hard-burn-color-value { display:block; margin-top:5px; font-size:11px; color:var(--burn-muted); line-height:1.5; text-align:start; unicode-bidi:isolate; }
.hard-burn-dialog[dir="rtl"] .hard-burn-color-value { text-align:right; }
.hard-burn-range-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.hard-burn-range-heading label { margin:0; font-size:14px; font-weight:500; }
.hard-burn-range-heading output { min-width:40px; padding:2px 7px; border-radius:6px; background:#f0eafa; color:#563096; font-size:12px; text-align:center; font-variant-numeric:tabular-nums; }
.hard-burn-range-control { display:flex; align-items:center; gap:12px; }
.hard-burn-range-control > span { flex:0 0 auto; color:var(--burn-muted); font-size:12px; }
.hard-burn-dialog #opt-position { flex:1 1 auto; min-width:32px; width:100%; height:32px; margin:0; appearance:none; -webkit-appearance:none; background:transparent; cursor:pointer; }
.hard-burn-dialog #opt-position::-webkit-slider-runnable-track { height:6px; background:#e5deef; border-radius:10px; }
.hard-burn-dialog #opt-position::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:22px; height:22px; margin-top:-8px; border:4px solid #fff; border-radius:50%; background:var(--burn-accent); box-shadow:0 0 0 1px #d2c6e7,0 2px 4px rgba(40,20,75,.18); }
.hard-burn-dialog #opt-position::-moz-range-track { height:6px; background:#e5deef; border-radius:10px; }
.hard-burn-dialog #opt-position::-moz-range-thumb { width:15px; height:15px; border:4px solid #fff; border-radius:50%; background:var(--burn-accent); box-shadow:0 0 0 1px #d2c6e7; }
.hard-burn-dialog #opt-position:focus-visible { outline:2px solid var(--burn-accent); outline-offset:3px; border-radius:6px; }
.hard-burn-dialog .form-group > .hard-burn-toggle { display:flex; align-items:flex-start; gap:10px; margin:0; font-size:14px; line-height:1.65; font-weight:400; cursor:pointer; }
.hard-burn-toggle input[type="checkbox"] { flex:0 0 18px; width:18px; height:18px; margin:3px 0 0; accent-color:var(--burn-accent); }
.hard-burn-toggle:has(input:disabled) { color:#737c8c; cursor:default; }
.hard-burn-dialog [data-speaker-color-options] { padding-top:16px; border-top:1px solid #e9ecf2; }
.hard-burn-dialog [data-speaker-style-row] { padding:12px 0 0; margin-bottom:12px; border:1px solid #e9ecf2; border-radius:10px; background:#f9fafc; }
.hard-burn-dialog .modal-footer { display:flex; flex-direction:row; flex-wrap:nowrap; flex:0 0 auto; gap:10px; padding:16px 24px; border-top:1px solid #e9ecf2; background:#fafbfe; }
.hard-burn-dialog .modal-footer .btn { width:auto; min-height:44px; min-width:92px; margin:0; padding:10px 22px; border-radius:9px; font-size:15px; font-weight:500; line-height:1.5; }
.hard-burn-dialog .modal-footer .btn-primary { border-color:var(--burn-accent); background:var(--burn-accent); color:#fff; }
.hard-burn-dialog .modal-footer .btn-primary:hover { border-color:#53279e; background:#53279e; }
.hard-burn-dialog .modal-footer .btn-secondary { border-color:#dce1eb; background:#fff; color:#465268; }
.hard-burn-dialog .modal-footer .btn:focus-visible, .hard-burn-dialog .close:focus-visible { outline:2px solid var(--burn-accent); outline-offset:3px; }
@media(min-width:768px) and (max-width:1023px) {
 .hard-burn-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
}
@media(max-width:767px) {
 .hard-burn-dialog .modal-dialog { width:calc(100% - 20px); margin:10px auto; }
 .hard-burn-dialog .modal-content { max-height:calc(100vh - 20px); max-height:calc(100dvh - 20px); border-radius:13px; }
 .hard-burn-dialog .modal-header { padding:14px 16px; gap:12px; }
 .hard-burn-dialog .modal-title { font-size:17px; line-height:1.6; }
 .hard-burn-dialog .modal-body { padding:16px; scrollbar-gutter:auto; }
 .hard-burn-layout { grid-template-columns:minmax(0,1fr); gap:20px; }
 .hard-burn-preview { position:static; }
 .hard-burn-preview-title { margin-bottom:8px; }
 .hard-burn-dialog #image-wrapper { max-height:27vh; max-height:27dvh; min-height:110px; }
 .hard-burn-dialog #preview-image { max-height:27vh; max-height:27dvh; }
 .hard-burn-dialog .modal-footer { padding:12px 16px; }
 .hard-burn-dialog .modal-footer .btn-primary { flex:1; }
 .hard-burn-field-grid { column-gap:12px; }
 .hard-burn-dialog .hard-burn-form > .row > .col-md-6 { width:100%; }
}
@media(max-width:359px) {
 .hard-burn-field-grid { grid-template-columns:minmax(0,1fr); }
 .hard-burn-dialog .modal-header { padding:12px; }
 .hard-burn-dialog .modal-body { padding:12px; }
 .hard-burn-dialog .modal-title { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .hard-burn-dialog.fade .modal-dialog { transition:none; } }
/* HARD_BURN_DIALOG_DESIGN_END */

/* Hard-burn formatting: native buttons, no downloaded icon fonts. */
.hard-burn-type-toolbar { display:flex; flex-wrap:wrap; gap:14px; align-items:center; }
.hard-burn-type-group { display:flex; gap:4px; }
.hard-burn-type-button { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:8px; border:1px solid var(--burn-border); border-radius:8px; background:#fff; color:#465268; font-family:system-ui,sans-serif; font-size:20px; line-height:1; cursor:pointer; }
.hard-burn-type-button i { font-family:Georgia,serif; font-weight:700; }
.hard-burn-type-button[aria-pressed="true"] { color:#fff; background:var(--burn-accent); border-color:var(--burn-accent); }
.hard-burn-type-button:hover { box-shadow:0 0 0 2px rgba(99,54,181,.12); }
.hard-burn-type-button:focus-visible { outline:2px solid var(--burn-accent); outline-offset:3px; }
