/* voiceoover studio — rich script editor (emotions + voice per passage). Pairs with vo-rich.js. */
.vr-ed { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 2.1; cursor: text; outline: none; min-height: 220px; display: block; overflow-y: auto; }
.vr-ed:empty::before { content: attr(data-ph); color: #A8A29E; pointer-events: none; }
.vr-ed .vr-seg { border-radius: 6px; padding: 2px 3px; cursor: pointer; }
.vr-ed .vr-seg[data-emo] { background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: inset 0 -2px 0 var(--c); }
.vr-ed .vr-seg[data-voice]:not([data-emo]) { background: color-mix(in srgb, var(--vc) 9%, transparent); box-shadow: inset 0 -2px 0 var(--vc); }
.vr-ed .vr-seg::before { content: attr(data-label); display: inline-block; white-space: nowrap; line-height: 1.5; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--c, #57534E); border-radius: 999px; padding: 1px 7px; margin-inline-end: 5px; vertical-align: 3px; user-select: none; font-family: inherit; }
.vr-ed .vr-seg[data-voice]::before { background: var(--vc); }
.vr-ed .vr-snd-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: #57534E; border: 1px dashed #D6D3D1; border-radius: 999px; padding: 0 8px; margin: 0 3px; vertical-align: 3px; user-select: none; }

.vr-bar { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-top: 1px solid #F1EFEC; font-size: 12.5px; color: #A8A29E; flex-wrap: wrap; }
.vr-bar .vr-hint.nudge { color: #6B21A8; font-weight: 600; }
.vr-open { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #E0DDD8; background: #fff; color: #5A5A5A; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; min-height: 32px; font-family: inherit; }
.vr-open.ready { border-color: #7C3AED; color: #6B21A8; background: #F5F0FF; }
.vr-clear { margin-inline-start: auto; background: none; border: none; font-size: 12px; color: #78716C; text-decoration: underline; cursor: pointer; font-family: inherit; }

.vr-pop { position: fixed; z-index: 9990; margin: 0; box-sizing: border-box; width: min(420px, calc(100vw - 32px)); background: #fff; border: 1px solid #ECEAE6; border-radius: 14px; box-shadow: 0 12px 32px rgba(28,25,23,.14), 0 2px 6px rgba(28,25,23,.08); padding: 8px; display: grid; gap: 6px; font-family: inherit; color: #1A1A1A; text-align: start; }
.vr-pop[hidden] { display: none !important; }
.vr-pop * { box-sizing: border-box; }
.vr-pop.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; border-radius: 18px 18px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.vr-pop.sheet .vr-arrow { display: none; }
.vr-arrow { position: absolute; width: 12px; height: 12px; background: #fff; border-left: 1px solid #ECEAE6; border-top: 1px solid #ECEAE6; pointer-events: none; }
.vr-head { display: flex; align-items: center; gap: 6px; }
.vr-tabs { flex: 1; display: flex; gap: 4px; background: #F4F3F1; border-radius: 10px; padding: 3px; min-width: 0; }
.vr-tabs button { flex: 1; min-width: 0; border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; color: #5A5A5A; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 36px; font-family: inherit; }
.vr-tabs button.on { background: #fff; color: #1A1A1A; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.vr-tabs .cur { font-size: 11px; font-weight: 700; color: #7C3AED; }
.vr-x { flex: none; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 10px; color: #78716C; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vr-x:hover { background: #F4F3F1; color: #1A1A1A; }
.vr-pane { display: grid; gap: 6px; }
.vr-pane[hidden] { display: none; }
.vr-emo { display: flex; flex-wrap: wrap; gap: 4px; }
.vr-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ECEAE6; background: #fff; border-radius: 999px; padding: 7px 11px; font-size: 13px; font-weight: 500; color: #1A1A1A; cursor: pointer; white-space: nowrap; min-height: 38px; font-family: inherit; }
.vr-chip:hover, .vr-chip.on { background: #F4F3F1; border-color: #E0DDD8; }
.vr-chip .d { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.vr-row { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid #F1EFEC; padding-top: 6px; }
.vr-snd { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #E0DDD8; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: #5A5A5A; cursor: pointer; min-height: 36px; font-family: inherit; }
.vr-snd:hover { color: #1A1A1A; border-color: #9B9590; }
.vr-vlist { display: grid; gap: 2px; max-height: 250px; overflow-y: auto; }
.vr-vsec { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9B9590; padding: 6px 8px 2px; }
.vr-vbtn { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 6px 8px; cursor: pointer; text-align: start; min-height: 44px; font-family: inherit; }
.vr-vbtn:hover, .vr-vbtn.on { background: #F4F3F1; }
.vr-vbtn.on { border-color: #E0DDD8; }
.vr-vbtn:disabled { opacity: .4; cursor: not-allowed; }
.vr-av { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.vr-vmeta { display: grid; min-width: 0; }
.vr-vmeta b { font-size: 13.5px; font-weight: 600; color: #1A1A1A; }
.vr-vmeta small { font-size: 11.5px; color: #9B9590; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-badge { margin-inline-start: auto; font-size: 10.5px; font-weight: 700; color: #7C3AED; background: #F5F0FF; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.vr-more { justify-self: start; border: 0; background: none; color: #7C3AED; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; font-family: inherit; }
.vr-note { font-size: 12px; color: #92400E; background: #FFFBEB; border-radius: 8px; padding: 6px 10px; }
.vr-note[hidden] { display: none; }
.vr-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid #F1EFEC; padding-top: 6px; flex-wrap: wrap; }
.vr-tip { flex: 1; min-width: 160px; font-size: 11.5px; color: #9B9590; padding: 0 6px 2px; }
.vr-rm { border: 0; background: none; color: #B91C1C; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; font-family: inherit; }
.vr-rm[hidden], .vr-done[hidden] { display: none; }
.vr-done { border: 0; background: #1A1A1A; color: #fff; border-radius: 10px; font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer; min-height: 40px; font-family: inherit; }

.vr-selchip { position: fixed; z-index: 9991; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; display: inline-flex; align-items: center; gap: 8px; background: #1A1A1A; color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; min-height: 46px; font: 600 14.5px inherit; font-family: inherit; box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: nowrap; }
.vr-selchip[hidden] { display: none !important; }
