/* Subtitle Editor — layout on top of /kit/kit.css */
.se { max-width: 1400px; }
.se-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 18px 0 12px; }
.se-head h1 { margin: 0 0 4px; font-size: clamp(22px, 3.4vw, 28px); letter-spacing: -.02em; }
.se-head .faint { margin: 0; }
.se-ic { display: inline-flex; }
.se-work { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 12px; align-items: start; }
@media (max-width: 980px) { .se-work { grid-template-columns: minmax(0, 1fr); } }
.se-left { display: grid; gap: 12px; min-width: 0; }
.se-player { padding: 10px; display: grid; gap: 8px; }
.se-stage { position: relative; background: #000; border-radius: 10px; overflow: hidden; display: grid; place-items: center; min-height: 200px; }
.se-stage.is-empty { background: transparent; }
.se-video { display: block; width: 100%; max-height: 56vh; background: #000; }
.se-drop { width: 100%; min-height: 240px; }
.se-cap { position: absolute; left: 50%; transform: translateX(-50%); max-width: 88%; text-align: center; white-space: pre-wrap; line-height: 1.25; pointer-events: none; font-family: Inter, "Noto Sans Arabic", Arial, sans-serif; }
.se-cap.se-bottom { bottom: 7%; }
.se-cap.se-top { top: 6%; }
.se-cap.se-box { background: rgba(0, 0, 0, .72); padding: .1em .35em; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.se-cap.se-outline { text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 0 4px #000; }
.se-controls { gap: 6px; }
.se-time { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.se-speed { width: auto; min-height: 30px; padding: 4px 26px 4px 8px; font-size: 12.5px; }
.se-timeline { padding: 10px; min-width: 0; }
.se-tlbar { margin-bottom: 6px; }
.se-tlscroll { position: relative; overflow-x: auto; overflow-y: hidden; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.se-ruler { position: relative; height: 22px; border-bottom: 1px solid var(--line); }
.se-ruler span { position: absolute; top: 3px; font-size: 10.5px; color: var(--text-3); padding-left: 3px; border-left: 1px solid var(--line-strong); height: 19px; font-variant-numeric: tabular-nums; }
.se-track { position: relative; height: 64px; cursor: text; }
.se-block { position: absolute; top: 8px; height: 48px; border-radius: 7px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); overflow: hidden; cursor: grab; display: flex; align-items: center; }
.se-block.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.se-block.is-now { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.se-btext { flex: 1; min-width: 0; padding: 0 8px; font-size: 11.5px; line-height: 1.25; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; pointer-events: none; }
.se-edge { width: 8px; align-self: stretch; cursor: ew-resize; flex: none; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.se-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: #e5484d; pointer-events: none; }
.se-list { padding: 10px; display: grid; gap: 8px; min-width: 0; }
.se-listbar { padding: 0 2px; }
.se-cues { display: grid; gap: 8px; max-height: calc(100vh - 230px); overflow-y: auto; padding: 2px; position: relative; }
@media (max-width: 980px) { .se-cues { max-height: 70vh; } }
.se-cue { padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 6px; }
.se-cue.is-now { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.se-cue.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.se-cue-h { display: flex; align-items: center; gap: 4px; }
.se-num { min-width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.se-num:hover { background: var(--accent); color: var(--accent-ink); }
.se-tin { width: 96px; min-height: 30px; padding: 4px 6px; font-family: var(--mono); font-size: 12px; }
.se-text { min-height: 52px; font-family: var(--font); font-size: 14px; resize: vertical; }
.se-cue-f { gap: 4px; }
.se-warn { font-size: 11.5px; color: var(--warn); }
.se-del:hover:not(:disabled) { color: var(--danger); }
.se-center { justify-content: center; margin-top: 10px; }
.se-h3 { margin: 16px 0 4px; font-size: 14px; }
.se-prog { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 12px 0; }
.se-prog span { display: block; height: 100%; width: 0; background: var(--accent); }
@media (max-width: 560px) { .se-tin { width: 86px; } }
.se-head .grow { min-width: 220px; }
.se-style { padding: 12px 14px; }
.se-style summary { cursor: pointer; font-weight: 650; }
.se-style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; }
.se-wave { position: absolute; top: 0; height: 64px; pointer-events: none; }
.se-menu { position: relative; }
.se-menu summary { list-style: none; cursor: pointer; }
.se-menu summary::-webkit-details-marker { display: none; }
.se-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-pop); display: grid; }
.se-menu-list button { text-align: start; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); }
.se-menu-list button:hover, .se-menu-list button:focus-visible { background: var(--surface-2); }
.se-sheet { width: min(560px, 100%); }
.se-sheet .textarea { min-height: 180px; }
.se-tapnext { font-size: 22px; font-weight: 700; min-height: 64px; margin: 8px 0 16px; }
.se-tapbtn { width: 100%; height: 72px; font-size: 18px; }
.se-keys { display: grid; gap: 7px; }
.se-keys kbd { min-width: 150px; text-align: center; }
