/* Setup preview and location-based otome reader. */
.script-character-card .script-mode-options {grid-template-columns:repeat(3,minmax(0,1fr))}
.script-mode-wireframe.is-otome {position:relative;justify-content:space-between;background:linear-gradient(155deg,var(--main-bg-color),var(--wire-ink))}
.script-mode-portrait {position:relative;align-self:center;width:32%;height:54%;background:var(--wire-ink);border-radius:45% 45% 12% 12%}
.script-mode-portrait::before {content:"";position:absolute;left:22%;top:-16%;width:56%;aspect-ratio:1;border-radius:50%;background:var(--wire-ink)}
.script-mode-caption {display:grid;gap:5px;background:var(--main-bg-color);border-radius:4px;padding:6px}
@media(max-width:600px){
    .script-character-card .script-mode-options{gap:6px}
    .script-character-card .script-mode-card{padding:6px;gap:4px}
    .script-character-card .script-mode-wireframe{height:clamp(84px,26vw,145px);width:100%;padding:4px}
    .script-character-card .script-mode-summary{font-size:10px}
}
.ot-shell {
    --ot-screen-height:100vh;--ot-ink:#fffaf5;--ot-text-shadow:0 1px 2px #19121b,0 1px 5px #19121bcc;--ot-shade:var(--body-bg-color);--ot-accent:var(--focus-color);
    --ot-header-wash:linear-gradient(to bottom,var(--ot-shade),transparent max(110px,17%));
    --ot-header-shadow:0 1px 2px var(--script-surface),0 0 3px var(--script-surface);
    position:fixed;inset:0;isolation:isolate;z-index:11;overflow:hidden;
    width:100%;color:var(--ot-ink);background-color:var(--ot-shade);
    background-position:center;background-size:cover;line-height:1.55;
    padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
@supports (height:100dvh){.ot-shell{--ot-screen-height:100dvh}}
.ot-shell::before,.ot-shell::after,.ot-backdrop,.ot-cast,.ot-tap{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.ot-shell::before,.ot-shell::after{content:""}
.ot-shell::before{z-index:-4;background:var(--ot-shade)}
.ot-backdrop{z-index:-3;object-fit:cover;filter:blur(3px);transform:scale(1.025)}
.ot-shell::after{z-index:-2;background:var(--ot-header-wash),linear-gradient(to bottom,transparent,#0003 25%,#0003 50%,#000c)}
.ot-cast{z-index:-1;display:flex;justify-content:center;align-items:flex-end;padding:4.5rem 3vw clamp(110px,18vh,175px);gap:1vw}
.ot-standee{object-fit:contain;object-position:center bottom;max-height:100%;max-width:min(80%,680px);min-width:0}
.ot-cast:has(>:nth-child(2))>.ot-stage-art{max-width:38%}
.ot-avatar{width:clamp(106px,24vmin,220px);height:clamp(106px,24vmin,220px);object-fit:cover;align-self:center;border-radius:50%;border:2px solid #ffffff85;box-shadow:0 8px 32px #211d2740}
.ot-head,.ot-foot,.ot-actions{position:relative;z-index:2}
.ot-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:clamp(10px,2.5vmin,24px);color:var(--ot-ink)}
.ot-head .ot-player{color:var(--main-color);text-shadow:var(--ot-header-shadow)}
.ot-player{display:grid;gap:3px;min-width:0;align-content:start;color:var(--ot-ink);text-align:left;text-shadow:var(--ot-text-shadow)}
.ot-player-line,.ot-player-meta,.ot-player-meta>span{display:flex;align-items:center;min-width:0}
.ot-player-line,.ot-player-meta{flex-wrap:wrap;gap:2px 12px}
.ot-player-attributes {
    display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:inherit;
    min-width:0;max-width:100%;max-height:clamp(95px,18vmin,130px);
    overflow:auto;overscroll-behavior:contain;pointer-events:auto;
}
@media(max-height:520px){.ot-player-attributes{max-height:62px}}
@supports not (height:100dvh) {
    .mivo-play-design #script-dialog.is-ot-mainline {
        max-height:calc(100vh - 32px - var(--mivo-cutout-top,0px) - var(--mivo-cutout-bottom,0px));
    }
}
.ot-player-identity{display:inline-flex;align-items:center;gap:7px;max-width:100%;min-height:36px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;text-shadow:inherit;cursor:pointer}
.ot-player-avatar{flex:none;width:32px;height:32px;border-radius:50%;object-fit:cover}
.ot-player-name{min-width:0;max-width:12em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:clamp(16px,1.6vw,20px);line-height:1.3;color:inherit}
.ot-player .script-status-attribute{min-width:0;max-width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.ot-player .script-status-attribute>span{display:flex;align-items:baseline;gap:4px;color:inherit;line-height:1.35}
.ot-player .script-status-attribute small,.ot-player .script-status-attribute strong{min-width:0;overflow-wrap:anywhere;font-size:13px;color:inherit}
.ot-player .script-status-attribute strong{font-variant-numeric:tabular-nums}
.ot-player .ot-player-meta{justify-self:start;max-width:100%;min-height:24px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;text-align:start;font:inherit;font-size:12px;line-height:1.5;cursor:pointer}
.ot-player button:focus-visible{outline:2px solid var(--ot-accent);outline-offset:2px}
.ot-player-meta>span{gap:4px;max-width:100%}
.ot-player-meta>span>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ot-player-meta svg{flex:none;width:14px;height:14px;color:inherit}
.ot-player .ot-player-meta:empty{display:none}
.ot-head small,.ot-controls small{font-variant-numeric:tabular-nums;font-size:12px}
.ot-shell .ot-tools,.ot-controls,.ot-event-list{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.mivo-play-design .ot-shell button.but,.ot-shell .script-exit{position:static;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:36px;margin:0;padding:6px 13px;border:1px solid #ffffff52;border-radius:20px;color:var(--ot-ink);background:#221f29c4;box-shadow:none;line-height:1.35}
.mivo-play-design .ot-shell button.but.c-theme{color:var(--beauty-on-accent,#fff);background:var(--ot-accent);border-color:transparent}
.mivo-play-design .ot-shell :is(.ot-tools,.ot-controls) button.but:not(.c-theme){color:var(--main-color);background:var(--script-surface);border-color:var(--script-line)}
.ot-shell button:disabled{opacity:.55}
.ot-shell :focus-visible{outline:2px solid currentColor;outline-offset:2px}
.ot-foot{position:absolute;inset:auto max(12px,env(safe-area-inset-right)) calc(10px + var(--ot-nav-space,64px)) max(12px,env(safe-area-inset-left));max-width:870px;margin-inline:auto}
.ot-actions {
    color:var(--main-color);background:var(--script-surface,var(--main-bg-color));
    border:1px solid var(--script-line);border-radius:16px;box-shadow:0 8px 28px #0003;
}
.ot-caption,.ot-live{background:transparent;border:0;box-shadow:none;color:var(--ot-ink);text-shadow:var(--ot-text-shadow)}
.ot-shell .ot-tap{z-index:0;pointer-events:auto;opacity:0;cursor:pointer;border:0}
.ot-caption{padding:14px clamp(16px,3vw,32px)}
.ot-name{display:block;letter-spacing:.05em;margin-bottom:6px;color:var(--ot-ink)}
.ot-text,.ot-translation,.ot-live{white-space:pre-wrap;overflow-wrap:anywhere}
.ot-text{font:var(--ot-font-size,16px)/1.75 var(--ot-font,serif);max-height:min(38vh,330px);overflow:auto}
.ot-translation{font-size:13px;margin:5px 0 0;color:#ece0dc;max-height:14vh;overflow:auto}
.ot-controls{margin-top:7px;gap:5px}
.ot-controls>.but:last-child{margin-left:auto}
.ot-controls small{padding-inline:4px;text-shadow:var(--ot-text-shadow)}
.ot-shell[data-view="actions"]{display:flex;flex-direction:column}
.ot-actions {
    width:min(570px,calc(100% - 24px));max-height:720px;position:relative;flex:0 1 auto;min-height:0;
    align-self:center;margin:auto auto calc(12px + var(--ot-nav-space,64px));overflow:hidden;
    display:flex;flex-direction:column;
}
.ot-action-scroll {
    flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:clamp(14px,3vw,24px);
}
.ot-action-scroll>* {flex:none;min-width:0}
.ot-action-scroll h3 {margin:0;color:var(--main-color);font-size:15px;font-weight:700;line-height:1.5}
.ot-turn-relations,.ot-turn-cast,.ot-decisions {display:grid;gap:8px}
.ot-relation {padding-inline-start:10px;border-inline-start:2px solid var(--script-line)}
.ot-relation>div {display:flex;align-items:baseline;gap:4px 10px;flex-wrap:wrap;font-size:14px}
.ot-relation span {font-size:12px;color:var(--focus-color)}
.ot-relation p {margin:3px 0 0;font-size:13px;line-height:1.65;color:var(--muted-color);overflow-wrap:anywhere}
.ot-turn-people {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));gap:6px}
.ot-turn-people button,.ot-edit-choice {
    padding:6px;background:transparent;color:var(--main-color);border:1px solid var(--script-line);border-radius:9px;
}
.ot-turn-people button {display:flex;align-items:center;gap:8px;text-align:left;min-width:0}
.ot-turn-people .ot-cast-avatar {width:36px;height:40px}
.ot-turn-people button>span:last-child {display:grid;min-width:0;overflow-wrap:anywhere}
.ot-turn-people small {color:var(--muted-color)}
.ot-action-scroll .ot-decision-heading {margin-top:3px}
.ot-choice-row {display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:5px;align-items:stretch}
.mivo-play-design .ot-shell .ot-choice-row .but,.mivo-play-design .ot-shell .ot-action-footer>.but,
.mivo-play-design .ot-shell .ot-action-scroll>.but:not(.c-theme) {
    --main-color:inherit;color:var(--main-color);background:var(--script-surface);border:1px solid var(--script-line);border-radius:9px;
}
.mivo-play-design .ot-shell .ot-choice-row .but {
    justify-content:flex-start;text-align:start;white-space:normal;overflow-wrap:anywhere;min-height:42px;padding:8px 12px;
}
.ot-edit-choice {display:grid;place-items:center;color:var(--focus-color)}
.ot-edit-choice svg {width:16px;height:16px}
.ot-action-footer {
    display:grid;gap:6px;padding:10px clamp(12px,3vw,20px);border-top:1px solid var(--script-line);
    background:var(--script-surface);flex:none;
}
.ot-action-footer>.but {justify-self:start}
.ot-compose {display:flex;align-items:center;gap:8px}
.ot-compose textarea {
    flex:1;min-width:0;min-height:42px;max-height:16vh;resize:none;
    color:var(--main-color);background:var(--script-surface);border:1px solid var(--script-line);border-radius:10px;padding:8px 10px;
}
@media (max-height:560px) {
    .ot-action-footer {display:flex;align-items:center;gap:5px;padding-block:5px}
    .ot-compose {flex:1;min-width:0}.ot-compose textarea {height:40px}
}
.ot-live{padding:10px 14px;max-height:28vh;overflow:auto;font-size:14px}.ot-live[hidden]{display:none}
.ot-shell *{scrollbar-width:none}.ot-shell *::-webkit-scrollbar{display:none}
@media(max-width:540px) and (orientation:portrait){
    .ot-shell[data-view="mainline"] .ot-player-name{max-width:9em}
    .ot-shell[data-view="mainline"] .ot-player-meta{column-gap:7px}
}
@media(max-width:480px){.mivo-play-design .ot-shell button.but{padding:6px 9px}.ot-controls{gap:3px}.ot-text{max-height:31vh;max-height:31dvh}}
@media (orientation:landscape) and (max-height:520px){
    .ot-shell .ot-head{padding-block:6px}.ot-cast{padding:34px 8% 78px}.ot-caption{padding-block:7px}.ot-text{max-height:25vh;max-height:25dvh}
}

/* Main-story controls use the device safe area when the play navigation is absent. */
.ot-shell.ot-fullscreen {
    --ot-nav-space:0px;
    --ot-edge-bottom:var(--mivo-cutout-bottom,env(safe-area-inset-bottom,0px));
    padding-bottom:var(--ot-edge-bottom);
}
.ot-fullscreen:not(.ot-speaking)>.ot-foot {bottom:calc(10px + var(--ot-edge-bottom))}

.mivo-play-design #script-workspace:has(.ot-shell){overflow:hidden}

.ot-stage-art{display:flex;align-items:flex-end;justify-content:center;min-height:0;min-width:0;max-width:100%;height:100%;flex:1;overflow:hidden;pointer-events:none}
.ot-stage-art :is(img,canvas){display:block;width:auto;height:100%;max-width:100%;object-fit:contain;object-position:center bottom;border:0;border-radius:0;box-shadow:none}
.ot-stage-art .ot-npc-avatar-art{
    --ot-picture-sides:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
    --ot-picture-ends:linear-gradient(transparent,#000 3%,#000 96%,transparent);
    -webkit-mask-image:var(--ot-picture-sides),var(--ot-picture-ends);
    mask-image:var(--ot-picture-sides),var(--ot-picture-ends);
    -webkit-mask-composite:source-in;mask-composite:intersect;
}
.ot-stage-art>svg{align-self:center;width:42px;height:42px;opacity:.7}
.ot-cast>.ot-stage-art{max-width:60%}
.ot-lead>svg{width:48px;height:48px;flex-shrink:1}
.ot-panel-list,.ot-field-choices{display:grid;gap:6px;min-width:0}
.ot-profile-row,.ot-person-row{display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:44px;padding:9px 4px;text-align:left;border:0;border-bottom:1px solid var(--script-line,var(--main-border-color));background:transparent;color:var(--main-color)}
.ot-profile-row span,.ot-profile-row strong,.ot-person-row span{overflow-wrap:anywhere;min-width:0}
.ot-profile-row strong{margin-left:auto;text-align:right}
.ot-person-row>span{display:grid;gap:3px;flex:1}
.ot-person-row>img{width:36px;height:36px;object-fit:cover;border-radius:50%}
.ot-board-preview{display:grid;gap:6px;justify-items:center}
.ot-board-preview img{max-width:100%;max-height:40vh}
.ot-past-events,.ot-profile-section{margin-block:8px}
.ot-past-events summary,.ot-profile-section summary{cursor:pointer;padding-block:8px}
.ot-profile-sheet{display:grid;gap:10px;min-width:0;color:var(--main-color)}
.ot-sheet-card{padding:10px 12px;background:var(--main-bg-color);border:1px solid var(--script-line,var(--main-border-color));border-radius:10px}
.ot-sheet-card>header,.ot-location-row{display:flex;align-items:center;gap:8px}
.ot-sheet-card>header{justify-content:space-between;margin-bottom:9px}
.ot-sheet-card h3,.ot-sheet-card summary{font-size:14px;font-weight:650;margin:0}
.ot-sheet-card summary{cursor:pointer;min-height:28px;line-height:28px}
.ot-sheet-card summary+.script-status-attributes{flex-wrap:wrap}
.ot-sheet-card .ot-profile-row{font-size:13px;min-height:38px}
.ot-sheet-card .ot-profile-row strong{font-weight:550}
.ot-location-row{min-height:38px;border-bottom:1px solid var(--script-line);font-size:13px}
.ot-location-row strong{margin-left:auto;text-align:right}
.ot-profile-avatar,.ot-portrait-tile,.ot-portrait-add{display:inline-grid;place-items:center;width:52px;height:62px;padding:2px;border:1px dashed var(--script-line,var(--focus-color));border-radius:8px;background:transparent;color:var(--main-color);overflow:hidden}
.ot-profile-avatar{width:42px;height:42px;margin-right:10px;vertical-align:middle}
.ot-profile-avatar img,.ot-portrait-tile img{width:100%;height:100%;object-fit:cover;border-radius:5px}
.ot-profile-avatar svg{width:22px;height:22px}
.ot-portrait-strip{display:flex;flex-wrap:wrap;gap:6px}
.ot-portrait-add span{font-size:23px}.ot-portrait-add small{font-size:11px}
.ot-portrait-tile[aria-pressed="true"]{border:2px solid var(--focus-color)}
.ot-shell[data-speaker="npc"] .ot-name{color:var(--ot-ink);border-left:3px solid var(--ot-accent);padding-left:8px}

/* Place scene headings and narration on the stage, independently of the reading controls. */
.ot-narrating>.ot-caption {
    position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%);
    width:min(86%,740px);box-sizing:border-box;padding:0;text-align:center;
}
.ot-narrating .ot-text {max-height:min(46vh,440px);max-height:min(46dvh,440px);line-height:1.85}
/* The speaking portrait and its caption share the available space above the reader controls. */
.ot-shell.ot-speaking {display:flex;flex-direction:column}
.ot-speaking>.ot-head {flex:none}
.ot-speaking>.ot-foot {
    position:relative;inset:auto;flex:1;min-height:0;display:flex;flex-direction:column;
    width:calc(100% - 24px);margin:0 auto calc(10px + var(--ot-nav-space,64px));
    pointer-events:none;
}
.ot-speaking .ot-caption {
    display:flex;flex:1;min-height:0;flex-direction:column;justify-content:flex-end;
    padding:0 clamp(5px,1.6vw,18px) clamp(24px,5vh,56px);
    padding-bottom:clamp(24px,5dvh,56px);
}
.ot-speaking .ot-caption>*,.ot-speaking .ot-controls,.ot-speaking .ot-live {pointer-events:auto}
.ot-speaking-portrait {
    flex:0 1 auto;min-height:0;align-self:center;display:block;width:100%;max-width:640px;
    height:min(86vw,46vh);height:min(86vw,46dvh);max-height:100%;
    object-fit:contain;object-position:center bottom;
    -webkit-mask-image:linear-gradient(#000 80%,transparent);
    mask-image:linear-gradient(#000 80%,transparent);
}
.ot-shell.ot-speaking .ot-name {
    position:relative;display:flex;align-items:center;gap:12px;flex:none;
    padding:0;border:0;font-size:clamp(16px,2.2vw,21px);line-height:1.4;
    margin:0 0 6px;font-weight:700;overflow-wrap:anywhere;
}
.ot-shell.ot-speaking .ot-speaking-portrait+.ot-name {margin-top:-16px}
.ot-speaking .ot-name::after {content:"";flex:1;height:1px;background:currentColor;opacity:.42}
.ot-speaking .ot-text {flex:0 1 auto;min-height:1.75em}
.ot-speaking .ot-translation {flex:0 1 auto;margin:2px 0 0;font-size:.93em}
.ot-speaking .ot-controls {flex:none}
.ot-shell[data-speaker="npc"] .ot-cast{animation:ot-speaker-in .23s ease-out}
@keyframes ot-speaker-in{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}

/* Place the event strips above the story, inside the stage safe area. */
.ot-shell[data-view="mainline"]{--ot-ink:var(--main-color);--ot-gutter:clamp(12px,3.6vw,22px);--ot-read-width:840px;--ot-overlay-ink:var(--main-color);--ot-overlay-accent:var(--ot-accent);--ot-text-shadow:none;color:var(--ot-ink)}
.ot-shell[data-view="mainline"]::after{background:var(--ot-header-wash)}
.ot-shell[data-view="mainline"] .ot-backdrop{filter:blur(2.5px);opacity:.96}
.ot-mainline-layout{position:absolute;inset:env(safe-area-inset-top) env(safe-area-inset-right) var(--ot-nav-space,64px) env(safe-area-inset-left);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,min(var(--ot-event-top,var(--ot-expanded-top,67.6%)),max(0px,calc(100% - var(--ot-event-reserve,194px))))) minmax(0,1fr) auto;isolation:isolate;pointer-events:none;transition:grid-template-rows .28s cubic-bezier(.22,1,.36,1)}
.ot-mainline-layout button,.ot-mainline-layout .ot-event-items{pointer-events:auto}
.ot-mainline-layout button{color:inherit;font:inherit;line-height:1.25;cursor:pointer}
.ot-mainline-layout>.ot-head{position:absolute;z-index:3;top:10px;left:clamp(10px,2.8vw,36px);padding:0;display:grid;gap:10px;justify-items:start;grid-template-columns:minmax(0,1fr) auto;right:clamp(10px,2.8vw,36px)}
.ot-mainline-layout .ot-player{position:relative;width:100%;box-sizing:border-box;min-height:46px;padding-left:49px;align-content:center;gap:4px}
.ot-mainline-layout .ot-player-avatar{position:absolute;left:0;top:3px;width:40px;height:40px;border:1.5px solid var(--script-line);border-radius:50%;background:var(--script-surface);box-shadow:0 2px 5px #0002}
.ot-mainline-layout .ot-player-line{flex-wrap:wrap;gap:4px 6px}
.ot-mainline-layout .ot-player-identity{min-height:24px;margin-right:2px}
.ot-mainline-layout .ot-player-name{max-width:clamp(48px,16vw,130px);font-size:16px;letter-spacing:.02em}
.ot-shell .ot-player .script-status-attribute{display:grid;grid-template-rows:1fr 2px;align-items:center;row-gap:2px;flex:none;min-height:29px;min-width:min(70px,100%);width:max-content;max-width:min(132px,100%);padding:3px 7px;border:1px solid;border-radius:7px;text-align:left}
.ot-shell .ot-player .script-status-attribute>span{display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-width:0}
.ot-shell .ot-player .script-status-attribute small,.ot-shell .ot-player .script-status-attribute strong{line-height:1.2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ot-shell .ot-player .script-status-attribute small{font-size:11px;font-weight:550}
.ot-shell .ot-player .script-status-attribute strong{flex:none;max-width:55%;font-size:12px;color:inherit}
.ot-shell .ot-player .script-status-attribute progress{display:block;width:100%;height:2px;border:0;border-radius:2px;overflow:hidden;appearance:none;background:var(--script-line);color:var(--script-attribute-color)}
.ot-shell .ot-player progress::-webkit-progress-bar{background:var(--script-line)}.ot-shell .ot-player progress::-webkit-progress-value{background:var(--script-attribute-color)}.ot-shell .ot-player progress::-moz-progress-bar{background:var(--script-attribute-color)}
.ot-mainline-layout .ot-player .ot-player-meta{gap:6px;font-size:12px;font-weight:600;color:var(--main-color);text-shadow:inherit}
.ot-mainline-layout .ot-player-meta svg{width:12px;height:12px;color:var(--ot-accent)}
.ot-mainline-layout .ot-player-meta>span+span::before{content:'·';margin-right:2px;color:var(--muted-color)}
.ot-hub-button{position:relative;display:grid;place-items:center;margin:0;padding:0;overflow:hidden;border:1px solid var(--script-line);border-radius:50%;background:var(--script-surface);box-shadow:0 3px 10px #0002}
.ot-hub-button svg,.ot-profile-row svg,.ot-person-row svg{flex:none;width:17px;height:17px}
.ot-head>.ot-hub-button,.ot-home-save{width:36px;height:36px}
.ot-head>.ot-hub-button span,.ot-home-save span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.ot-mainline-layout :is(.ot-roster-trigger,.ot-home-save,.ot-home-actions>.script-exit),.ot-shell .ot-player .script-status-attribute{
    isolation:isolate;border-color:var(--focus-color);background:var(--focus-color);color:var(--main-color);box-shadow:none;
}
.ot-shell .ot-player .script-status-attribute{position:relative}
.ot-mainline-layout :is(.ot-roster-trigger,.ot-home-save,.ot-home-actions>.script-exit)::before,.ot-shell .ot-player .script-status-attribute::before{
    content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;
    background:var(--script-surface,var(--main-bg-color));opacity:.78;
}
.ot-roster-trigger>svg{display:block;width:20px;height:20px;fill:none}
.ot-roster-trigger>svg path{fill:none}
.ot-home-save>.fa-archive{font-size:19px;line-height:1}
.ot-home-actions{grid-area:1 / 2;align-self:start;display:flex;align-items:center;gap:6px;padding-top:4px}
.ot-mainline-layout>.ot-head>:is(.ot-roster-trigger,.ot-back-story){grid-column:1}
.mivo-play-design .ot-home-actions>.script-exit{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:36px;min-height:36px;padding:0 9px;border-radius:18px;font-size:13px}
.ot-home-actions .script-exit-icon,.ot-home-actions .script-exit-icon svg{width:16px;height:16px}
.ot-hub-rail{position:absolute;z-index:3;right:clamp(9px,2.4vw,36px);top:74px;display:grid;gap:9px}
.ot-hub-rail .ot-hub-button{width:51px;height:53px;border-radius:12px;background:var(--script-surface);color:var(--ot-accent)}
.ot-hub-rail .ot-hub-button>span{position:absolute;z-index:1;inset:auto 0 0;padding:9px 1px 3px;background:linear-gradient(transparent,#000b);color:white;font-size:11px;font-weight:650}
.ot-hub-rail svg{margin-bottom:10px}.ot-hub-rail span svg{display:inline-block;width:11px;height:11px;margin:0 3px 0 0;vertical-align:-1px}.ot-hub-rail img~svg{display:none}.ot-hub-rail img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ot-map-pin{position:absolute;transform:translate(-50%,-50%);width:8px;height:8px;border:1px solid var(--script-surface);border-radius:50%;background:var(--ot-accent)}
.ot-center{position:absolute;z-index:0;inset:5% 0 19%;pointer-events:none;transition:transform .28s cubic-bezier(.22,1,.36,1)}
.ot-center .ot-lead{position:absolute;left:50%;transform:translateX(-50%);width:min(88%,620px);height:100%;margin:0;padding:0;border:0;display:flex;justify-content:center;align-items:center;background:transparent;box-shadow:none}
.ot-lead>.ot-stage-art{width:100%;height:100%;align-items:center}
.ot-stage-art .ot-player-portrait{
    flex:none;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom;
    -webkit-mask-image:var(--ot-subject-mask,none);mask-image:var(--ot-subject-mask,none);
    -webkit-mask-size:100% 100%;mask-size:100% 100%;
}
.ot-lead .ot-player-portrait{
    --ot-edge-mask:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent);
    --ot-foot-mask:linear-gradient(#000 58%,transparent 98%);
    -webkit-mask-image:var(--ot-edge-mask),var(--ot-foot-mask),var(--ot-subject-mask,linear-gradient(#000,#000));
    mask-image:var(--ot-edge-mask),var(--ot-foot-mask),var(--ot-subject-mask,linear-gradient(#000,#000));
    -webkit-mask-composite:source-in;mask-composite:intersect;
}
@media (min-width:901px) and (hover:hover) and (pointer:fine){
    .ot-center{inset:6% 0 22.8%;--ot-compact-lead-width:38%}
    .ot-center .ot-lead{width:min(71%,535px)}
    .ot-mainline-layout[data-events-expanded="true"] .ot-center{transform:translateX(clamp(-76px,calc(5% - 124px),-28px))}
    .ot-lead>.ot-stage-art:not([data-small="true"]){align-items:flex-end}
}
.ot-lead>svg{width:54px;height:54px}
.ot-event-dock{
    grid-row:2;justify-self:end;align-self:start;display:flex;flex-direction:column;align-items:stretch;
    position:relative;z-index:2;box-sizing:border-box;width:clamp(235px,64%,380px);max-width:100%;max-height:100%;min-height:0;
    padding:0 0 6px;color:var(--ot-overlay-ink);text-shadow:none;font-size:12px;
}
.ot-event-dock header{
    flex:none;position:relative;align-self:flex-end;display:flex;align-items:center;justify-content:space-between;gap:2px;
    width:max-content;min-width:82%;max-width:100%;box-sizing:border-box;min-height:28px;
    padding:0 10px 0 clamp(16px,4vw,23px);border:0;background:transparent;
}
.ot-event-dock header strong{white-space:nowrap;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.ot-event-dock button{margin:0;border:0;background:transparent;color:inherit;text-shadow:inherit;box-shadow:none}
.ot-event-dock header button{min-height:28px;padding:2px 4px;color:inherit;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ot-event-dock header .ot-event-done{color:var(--ot-overlay-accent)}
.ot-event-fold{
    display:flex;flex:0 1 auto;min-height:0;max-height:clamp(76px,17vh,170px);overflow:hidden;
    opacity:1;transform:translateX(0);transition:transform .28s cubic-bezier(.22,1,.36,1),max-height .28s ease,opacity .22s ease;
}
.ot-event-items{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding-top:7px}
.ot-event-dock .ot-event-link,.ot-event-empty{
    box-sizing:border-box;width:100%;margin:0;padding:7px 13px 7px clamp(22px,5.5vw,34px);
    border:0;border-radius:0;background:transparent;text-align:left;color:inherit;
}
.ot-event-empty{padding-left:16px;color:inherit;font-size:11px;line-height:1.55;text-align:right;text-wrap:balance;overflow-wrap:anywhere}
.ot-event-link{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 6px}
.ot-event-link:focus-visible,.ot-event-dock header button:focus-visible{outline:2px solid var(--ot-accent);outline-offset:-2px}
.ot-event-link+.ot-event-link{margin-top:5px}
.ot-event-link strong,.ot-event-link small{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ot-event-link strong{font-size:14px;line-height:1.35}
.ot-event-description,.ot-event-link small{grid-column:1/-1}
.ot-event-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.45}
.ot-event-link small{color:inherit;font-size:11px}
.ot-event-go{padding:1px 0;color:var(--ot-overlay-accent);font-size:12px;font-weight:650}
.ot-mainline-layout[data-events-expanded="false"]{--ot-event-top:var(--ot-folded-top,72.4%);--ot-event-reserve:172px}
.ot-mainline-layout[data-events-expanded="false"] .ot-event-dock header{min-width:0;justify-content:flex-end;gap:6px;padding-inline:0 clamp(10px,3.6vw,20px);font-weight:650}
.ot-mainline-layout[data-events-expanded="false"] .ot-event-dock header button{padding-inline:1px;font-size:11px}
.ot-mainline-layout[data-events-expanded="false"] .ot-event-fold{max-height:0;opacity:0;transform:translateX(18px);pointer-events:none}
.ot-shell[data-view="mainline"] .ot-mainline-layout>.ot-preview{
    --ot-preview-fade:18px;grid-row:3;position:relative;inset:auto;z-index:2;isolation:isolate;box-sizing:border-box;
    width:100%;max-width:none;margin:0;border:0;padding:calc(var(--ot-preview-fade) + 5px) max(var(--ot-gutter),calc((100% - var(--ot-read-width)) / 2)) 15px;
    color:var(--main-color);text-shadow:none;
}
/* Only the lip fades into the scene. Keep a solid script-colored surface behind every line. */
.ot-preview::before,.ot-preview::after{
    content:"";position:absolute;pointer-events:none;z-index:-1;
    inset:0 calc(0px - env(safe-area-inset-right,0px)) 0 calc(0px - env(safe-area-inset-left,0px));
}
.ot-preview::before{background:linear-gradient(to bottom,transparent,var(--ot-shade) var(--ot-preview-fade))}
.ot-preview::after{background:linear-gradient(to bottom,transparent,var(--ot-accent) var(--ot-preview-fade));opacity:.14}
.ot-preview-head{display:flex;align-items:center;gap:9px}
.ot-preview-head>strong{min-width:0;max-width:48%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:17px;line-height:1.3}
.ot-page-count{padding-left:9px;border-left:1px solid var(--script-line);color:inherit;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ot-preview-head .ot-continue{display:inline-flex;flex:none;justify-content:center;align-items:center;gap:6px;min-height:35px;margin-left:auto;padding:6px 13px;border:1px solid currentColor;border-radius:999px;background:transparent;box-shadow:none;color:inherit;text-shadow:none;font-weight:650;font-size:13px}
.ot-continue svg{width:14px;height:14px}
.ot-preview-text{margin:9px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font:calc(var(--ot-font-size,14px) + 1px)/1.6 var(--ot-font,serif)}
.ot-preview-text b{color:var(--ot-overlay-accent);margin-right:8px}
@media(orientation:landscape) and (max-height:500px){
    .ot-shell[data-view="mainline"] .ot-center{inset:0 0 8%}
    .ot-shell[data-view="mainline"] .ot-center .ot-lead{width:var(--ot-compact-lead-width,45%)}
    .ot-shell[data-view="mainline"] .ot-hub-rail{top:60px;display:flex}
    .ot-shell[data-view="mainline"] .ot-mainline-layout>.ot-preview{--ot-preview-fade:6px;padding-block:9px 6px}
    .ot-shell[data-view="mainline"] .ot-preview-head .ot-continue{min-height:29px;padding-block:3px}
    .ot-shell[data-view="mainline"] .ot-preview-text{margin:4px 0 0}
    .ot-shell[data-view="mainline"] .ot-mainline-layout{--ot-expanded-top:52%;--ot-folded-top:58%}
    .ot-shell[data-view="mainline"] .ot-event-fold{max-height:84px}
    .ot-shell[data-view="mainline"] .ot-mainline-layout[data-events-expanded="false"] .ot-event-dock .ot-event-fold{max-height:0}
}
@media(prefers-reduced-motion:reduce){.ot-mainline-layout,.ot-center,.ot-event-fold{transition:none}.ot-shell[data-speaker="npc"] .ot-cast{animation:none}}

.script-map-destination.is-explore{display:grid;grid-template-columns:minmax(0,1fr) auto;width:min(272px,calc(100% - 76px));gap:6px 10px}
.script-map-destination.is-explore input{grid-column:1/-1;width:100%;min-width:0}
.ot-actions .script-event-end-control{align-self:stretch}
.ot-actions .script-event-end-popover{position:static;width:100%;max-height:none;margin-top:8px}

/* Cast picker shares the play dialog's close button, palette and focus handling. */
.mivo-play-design #script-dialog.script-dialog[open][aria-describedby~="ot-cast-met-count"]{
    position:fixed;inset:auto 0 0;margin:0 auto;box-sizing:border-box;width:min(100%,520px);max-width:100%;
    height:min(60vh,590px);height:min(60dvh,590px);max-height:calc(100dvh - var(--mivo-cutout-top,env(safe-area-inset-top,0px)) - 10px);
    display:flex;flex-direction:column;overflow:hidden;padding:0;border:1px solid var(--script-line);border-bottom:0;
    border-radius:22px 22px 0 0;transform:translateY(var(--ot-sheet-drag,0));animation:ot-roster-in .2s ease-out;
}
@keyframes ot-roster-in{from{transform:translateY(36px);opacity:.5}to{transform:translateY(0);opacity:1}}
.mivo-play-design #script-dialog[aria-describedby~="ot-cast-met-count"] .script-dialog-head{
    position:relative;flex:none;margin:0;padding:18px 16px 10px;touch-action:none;user-select:none;border-bottom:1px solid var(--script-line);
}
.mivo-play-design #script-dialog[aria-describedby~="ot-cast-met-count"] .script-dialog-head::before{
    content:"";position:absolute;top:6px;left:50%;transform:translateX(-50%);width:32px;height:4px;
    border-radius:4px;background:var(--muted-color);opacity:.45;
}
.mivo-play-design #script-dialog[aria-describedby~="ot-cast-met-count"] #script-dialog-content{
    flex:1;min-height:0;display:flex;flex-direction:column;padding:0;overflow:hidden;
}
.ot-roster-sheet{
    flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;
    padding:10px max(14px,env(safe-area-inset-right)) max(16px,var(--mivo-cutout-bottom,env(safe-area-inset-bottom))) max(14px,env(safe-area-inset-left));
}
.ot-roster-sheet::-webkit-scrollbar,.ot-character-info::-webkit-scrollbar{display:none}
.ot-roster-sheet h3{margin:17px 0 7px;font-size:13px;font-weight:650;color:var(--main-color);line-height:1.5}
.ot-cast-card{
    box-sizing:border-box;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:10px;
    width:100%;margin:0;padding:12px 0;background:transparent;border:0;border-bottom:1px solid var(--script-line);
    border-radius:0;color:var(--main-color);text-align:start;line-height:1.4;font:inherit;cursor:pointer;
}
.ot-cast-card:focus-visible,.ot-back-story:focus-visible,.ot-character-title button:focus-visible{outline:2px solid var(--focus-color);outline-offset:-2px}
.ot-cast-card>svg{width:14px;height:14px;align-self:center;color:var(--muted-color)}
.ot-cast-avatar{position:relative;display:grid;place-items:center;flex:none;width:46px;height:54px;overflow:hidden;border-radius:9px;background:var(--script-line);color:var(--main-color);font-size:17px}
.ot-cast-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 25%}
.ot-cast-copy{min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}
.ot-cast-title{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px}
.ot-cast-copy strong{font-size:15px;line-height:1.4}
.ot-cast-title small,.ot-cast-back{color:var(--focus-color);font-size:11px}
.ot-cast-meta,.ot-cast-bio,.ot-cast-empty,.ot-cast-locked{font-size:12px;line-height:1.5;color:var(--muted-color)}
.ot-cast-bio,.ot-cast-opinion{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.ot-cast-opinion{margin-top:2px;font-size:13px;line-height:1.5;color:var(--main-color)}
.ot-cast-player{align-items:center;padding-block:5px 10px}
.ot-cast-player .ot-cast-avatar{width:38px;height:38px;border-radius:50%}
.ot-cast-locked{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--script-line)}
.ot-cast-locked span:first-child{display:grid;place-items:center;width:36px;height:36px;border:1px dashed var(--script-line);border-radius:9px}
.ot-character-board.ot-mainline-layout{grid-template-rows:minmax(0,1fr) auto;transition:none}
.ot-character-board>.ot-head{gap:7px}
.ot-character-board .ot-back-story,.ot-character-board .ot-roster-trigger,.ot-character-title button{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;width:auto;padding:3px 12px;
    border:1px solid var(--script-line);border-radius:20px;background:var(--script-surface);color:var(--main-color);font-size:13px;
}
.ot-character-board .ot-back-story .ot-cast-avatar{width:25px;height:25px;flex:none;border-radius:50%;font-size:12px}
.ot-character-board .ot-roster-trigger span{position:static;width:auto;height:auto;clip-path:none;overflow:visible}
.ot-character-board .ot-roster-trigger svg{width:16px;height:16px}
.ot-character-figure{
    grid-area:1/1;align-self:end;justify-self:center;display:grid;place-items:end center;min-height:0;margin:0;
    width:min(78%,465px,49vh);height:min(100%,55vh);transform:translateY(16%);pointer-events:none;
}
.ot-character-figure>svg{width:50px;height:50px;color:var(--ot-overlay-ink)}
.ot-character-figure .ot-stage-art{width:100%;height:100%;mask-image:linear-gradient(#000 85%,transparent);-webkit-mask-image:linear-gradient(#000 85%,transparent)}
.ot-character-figure .ot-stage-art :is(img,canvas){width:100%;height:100%;object-fit:contain;object-position:center bottom}
.ot-character-info{
    position:relative;grid-area:2/1;align-self:end;box-sizing:border-box;width:100%;min-height:0;max-height:40vh;max-height:40dvh;
    display:flex;flex-direction:column;gap:8px;padding:14px max(16px,calc((100% - 580px)/2)) 14px;
    background:linear-gradient(to bottom,transparent,var(--script-surface) 35%);color:var(--main-color);overflow-wrap:anywhere;pointer-events:auto;
}
.ot-character-info::before{content:"";position:absolute;inset:-32px 0 0;z-index:-1;background:linear-gradient(transparent,var(--script-surface) 78%)}
.ot-character-title{display:flex;align-items:center;gap:8px;flex:none}
.ot-character-title h2{margin:0;font-size:clamp(17px,3vw,21px);line-height:1.25;font-weight:700;min-width:0;overflow-wrap:anywhere}
.ot-character-meta{min-width:0;font-size:13px;line-height:1.3}
.ot-character-title .ot-info-toggle{margin-left:auto;padding:3px 6px;min-width:32px;background:transparent;border:0}
.ot-character-title button svg{width:14px;height:14px}
@media(min-width:901px){
    .ot-character-figure{width:min(400px,38vh);height:min(100%,43vh)}
    .ot-character-info{max-height:31vh;max-height:31dvh}
}
.ot-info-toggle svg{transform:rotate(180deg)}.ot-info-toggle[aria-expanded="false"] svg{transform:none}.ot-open-contact svg{transform:rotate(-90deg)}
.ot-person-summary{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.ot-person-summary[hidden]{display:none}
.ot-character-meters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ot-rel-meter{--meter-color:#cf5689;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px;font-size:13px}
.ot-rel-friend{--meter-color:#318464}.ot-rel-meter span{display:inline-flex;align-items:center;gap:4px;font-weight:650}
.ot-rel-meter svg{width:13px;height:13px;color:var(--meter-color)}.ot-rel-meter strong{color:var(--meter-color);font-variant-numeric:tabular-nums}
.ot-rel-meter small{font-weight:400;color:var(--muted-color);margin-left:2px}
.ot-rel-meter progress{grid-column:1/-1;width:100%;height:7px;overflow:hidden;appearance:none;border:0;border-radius:8px;background:var(--script-line);accent-color:var(--meter-color)}
.ot-rel-meter progress::-webkit-progress-bar{background:var(--script-line)}.ot-rel-meter progress::-webkit-progress-value{background:var(--meter-color);border-radius:8px}.ot-rel-meter progress::-moz-progress-bar{background:var(--meter-color)}
.ot-character-info blockquote,.ot-contact-request{margin:12px 0 8px;padding:10px 13px;border:1px solid var(--script-line);border-radius:12px;background:var(--script-surface);white-space:pre-line;line-height:1.65}
.ot-character-bio{margin:8px 0 0;white-space:pre-line;line-height:1.7}
.ot-person-summary::-webkit-scrollbar,.ot-contact-looks::-webkit-scrollbar{display:none}
@media(max-height:480px){
    .mivo-play-design #script-dialog.script-dialog[open][aria-describedby~="ot-cast-met-count"]{height:74vh;height:74dvh}
    .ot-character-figure{margin-top:24px}
    .ot-character-info{padding-block:3px 6px;max-height:38vh;max-height:38dvh}
}
@media(max-width:640px){
    .mivo-play-design #script-dialog.script-dialog[open][aria-describedby~="ot-cast-met-count"]{width:100%}
}
@media(min-width:769px) and (min-height:501px){
    .mivo-play-design #script-dialog.script-dialog[open][aria-describedby~="ot-cast-met-count"]{
        inset:0;margin:auto;border-bottom:1px solid var(--script-line);border-radius:20px;
    }
}
@media(prefers-reduced-motion:reduce){.mivo-play-design #script-dialog.script-dialog[open][aria-describedby~="ot-cast-met-count"]{animation:none}}


/* 主线弹窗与舞台共用剧本皮肤。地图和人物抽屉沿用各自的滚动容器。 */
.mivo-play-design #script-dialog.is-ot-mainline {
    --ot-dialog-tint:color-mix(in srgb,var(--focus-color) 6%,var(--script-surface));
    --ot-dialog-rule:color-mix(in srgb,var(--focus-color) 23%,var(--script-surface));
    --ot-dialog-gutter:clamp(14px,4vw,24px);
    border:1px solid var(--ot-dialog-rule);
    border-radius:18px;
    background:var(--script-surface);
    color:var(--main-color);
    box-shadow:0 12px 44px -14px #0006;
    scrollbar-width:none;
}
#script-dialog.is-ot-mainline::backdrop {background:rgb(17 20 31 / 44%)}
#script-dialog.is-ot-mainline::-webkit-scrollbar {display:none}
.mivo-play-design #script-dialog.is-ot-mainline:not(.is-script-map) .script-dialog-head {
    background:var(--ot-dialog-tint);
    border-bottom:1px solid var(--ot-dialog-rule);
    padding-inline:var(--ot-dialog-gutter);
}
.mivo-play-design #script-dialog.is-ot-mainline .script-dialog-head h2 {
    color:var(--main-color);
    font-weight:700;
    letter-spacing:.02em;
}
.mivo-play-design #script-dialog.is-ot-mainline .script-dialog-head [data-dialog-close] {
    background:var(--script-surface);
    border:1px solid var(--ot-dialog-rule);
    border-radius:50%;
    color:var(--main-color);
}
#script-dialog.is-ot-mainline :is(button,summary,input,textarea,select):focus-visible {
    outline:2px solid var(--focus-color);
    outline-offset:-2px;
}
#script-dialog.is-ot-mainline :where(#script-dialog-content) {padding-inline:var(--ot-dialog-gutter)}
#script-dialog.is-ot-mainline :is(.script-field,.script-inline-actions,.script-input) {min-width:0}
#script-dialog.is-ot-mainline .script-input {
    box-sizing:border-box;
    max-width:100%;
    background:var(--script-surface);
    color:var(--main-color);
    border:1px solid var(--ot-dialog-rule);
    border-radius:9px;
}
#script-dialog.is-ot-mainline :is(.script-inline-actions,.script-dialog-actions) {flex-wrap:wrap}
#script-dialog.is-ot-mainline :is(#script-dialog-content>.but,.script-inline-actions>.but) {
    min-height:36px;
    border-radius:10px;
    white-space:normal;
}
.mivo-play-design #script-dialog.is-ot-mainline .but:where(:not(.c-red-2):not(.c-red)) {
    --main-color:inherit;
    --this-color:var(--main-color);
    color:var(--main-color);
}
.mivo-play-design #script-dialog.is-ot-mainline .but.c-theme,
.mivo-play-design #script-dialog.is-ot-mainline .script-save-row .but:first-child {
    color:var(--beauty-on-accent,#fff);
    background:var(--focus-color);
    border-color:var(--focus-color);
}
#script-dialog.is-ot-mainline .script-subtle {color:var(--muted-color)}
#script-dialog.is-ot-mainline #script-dialog-content>p:only-child {
    margin:0;
    padding-block:12px;
    text-align:center;
}
#script-dialog.is-ot-mainline .script-save-row {
    padding:12px 0;
    gap:8px 14px;
    border-color:var(--ot-dialog-rule);
}
#script-dialog.is-ot-mainline .script-save-row:first-child {padding-top:0}
#script-dialog.is-ot-mainline .script-save-row .script-save-copy {flex:1 1 7em;min-width:0}
#script-dialog.is-ot-mainline .script-save-row :is(h3,p) {margin:0}
#script-dialog.is-ot-mainline .ot-slot-icon {
    display:grid;place-items:center;flex:none;width:34px;height:38px;
    border:1px dashed var(--ot-dialog-rule);border-radius:9px;color:var(--muted-color);
}
#script-dialog.is-ot-mainline .ot-slot-icon svg {width:18px;height:18px}
#script-dialog.is-ot-mainline .ot-slot-icon.is-occupied {
    border-style:solid;background:var(--ot-dialog-tint);color:var(--focus-color);
}
#script-dialog.is-ot-mainline .script-save-row h3 {margin-bottom:3px;font-size:15px;color:var(--main-color)}
#script-dialog.is-ot-mainline .script-map-destination {border-color:var(--ot-dialog-rule);border-radius:12px}
#script-dialog.is-ot-mainline .ot-roster-sheet h3 {color:var(--focus-color)}
#script-dialog.is-ot-mainline .ot-cast-player {padding:8px 10px;background:var(--ot-dialog-tint);border:0;border-radius:10px}
#script-dialog.is-ot-mainline .ot-cast-opinion {border-inline-start:2px solid var(--ot-dialog-rule);padding-inline-start:7px}
.mivo-play-design #script-dialog.is-ot-mainline:has(.ot-profile-sheet) {
    width:min(420px,calc(100% - 32px));
    max-height:min(720px,calc(100dvh - 40px - var(--mivo-cutout-top,0px) - var(--mivo-cutout-bottom,0px)));
}
#script-dialog.is-ot-mainline .ot-profile-sheet {gap:0}
#script-dialog.is-ot-mainline .ot-sheet-card {
    border:0;
    border-bottom:1px solid var(--ot-dialog-rule);
    border-radius:0;
    padding:11px 0;
    background:transparent;
}
#script-dialog.is-ot-mainline .ot-sheet-card:first-child {padding-top:0}
#script-dialog.is-ot-mainline .ot-sheet-card:last-child {border-bottom:0;padding-bottom:0}
#script-dialog.is-ot-mainline .ot-sheet-card :is(h3,summary) {
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--main-color);
}
#script-dialog.is-ot-mainline .ot-sheet-card summary {list-style:none;min-height:36px}
#script-dialog.is-ot-mainline .ot-sheet-card summary::-webkit-details-marker {display:none}
#script-dialog.is-ot-mainline .ot-sheet-card :is(h3,summary)>svg {width:16px;height:16px;color:var(--focus-color);flex:none}
#script-dialog.is-ot-mainline .ot-sheet-card summary>svg:last-child {margin-left:auto;width:14px;transform:rotate(-90deg)}
#script-dialog.is-ot-mainline .ot-sheet-card[open] summary>svg:last-child {transform:none}
#script-dialog.is-ot-mainline .ot-profile-avatar {
    width:36px;height:36px;margin:0 9px 0 0;padding:0;
    border:1px solid var(--ot-dialog-rule);border-radius:50%;background:var(--script-surface);
}
#script-dialog.is-ot-mainline .ot-profile-avatar img {border-radius:inherit}
#script-dialog.is-ot-mainline .ot-portrait-add {color:var(--focus-color);background:var(--ot-dialog-tint)}
#script-dialog.is-ot-mainline .ot-profile-row {border:0;padding-inline:0}
#script-dialog.is-ot-mainline .ot-profile-row>svg {width:14px;color:var(--muted-color)}
#script-dialog.is-ot-mainline .ot-profile-sheet .script-status-attributes {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr));
    gap:12px 18px;margin:6px 0 2px;padding:0;border:0;
}
#script-dialog.is-ot-mainline .ot-profile-sheet .script-status-attribute {min-width:0}
#script-dialog.is-ot-mainline .ot-profile-sheet .script-status-attribute>span,
.ot-shell .ot-player .ot-player-line .script-status-attribute>span {
    display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px;
}
#script-dialog.is-ot-mainline .ot-profile-sheet .script-status-attribute>span {
    grid-template-columns:auto minmax(0,1fr) minmax(0,auto);
}
#script-dialog.is-ot-mainline .ot-profile-sheet .script-status-attribute :is(small,strong) {
    white-space:normal;overflow-wrap:anywhere;font-size:12px;
}
.ot-shell .ot-player .ot-player-line .script-status-attribute strong {min-width:0;max-width:6em}
:is(.ot-player,#script-dialog.is-ot-mainline) .ot-stat-icon {
    display:block;width:14px;height:14px;margin:0;
    fill:none;stroke:currentColor;stroke-width:1.8;color:var(--focus-color);
}
.ot-event-entry {
    display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;
    width:100%;min-height:44px;padding:9px 0;
    background:transparent;border:0;border-bottom:1px solid var(--ot-dialog-rule);color:inherit;text-align:start;
}
.ot-event-entry>span {display:grid;gap:3px;overflow-wrap:anywhere}
.ot-event-entry>svg {width:17px;height:17px;color:var(--focus-color)}
.ot-event-entry>svg:last-child {width:14px}
.ot-event-entry strong {font-size:14px;font-weight:650}
.ot-event-entry small {font-size:12px;color:var(--muted-color)}
@media (hover:hover) {
    #script-dialog.is-ot-mainline :is(.ot-event-entry,.ot-cast-card,.ot-profile-row):hover {background:var(--ot-dialog-tint)}
}

/* Story notifications float above the stage without blocking the reading controls. */
.ot-notices {
    position:absolute;z-index:6;inset-inline:0;top:max(8px,env(safe-area-inset-top));
    width:min(80%,420px);margin-inline:auto;pointer-events:none;
    color:var(--main-color);font:13px/1.5 system-ui,sans-serif;text-shadow:none;
}
.ot-notices[hidden]{display:none}
.ot-notice-card {
    display:grid;grid-template-columns:42px minmax(0,1fr);gap:4px 10px;
    box-sizing:border-box;padding:12px 13px 10px;border-radius:20px;pointer-events:auto;
    border:1px solid color-mix(in srgb,var(--main-color) 28%,transparent);
    background:var(--script-surface);background:color-mix(in srgb,var(--focus-color) 9%,var(--script-surface));
    box-shadow:0 6px 22px #0002,inset 0 1px 0 #ffffff52;
}
.ot-notice-card :is(.ot-cast-avatar,.ot-notice-heart) {
    width:42px;height:42px;align-self:start;border-radius:14px;overflow:hidden;
    display:grid;place-items:center;background:color-mix(in srgb,var(--focus-color) 15%,var(--script-surface));color:var(--focus-color);
}
.ot-notice-card .ot-notice-heart svg{width:22px;height:22px;stroke-width:1}
.ot-notice-heart svg path{fill:currentColor}
.ot-notice-heading,.ot-notice-person,.ot-notice-actions{display:flex;align-items:center;gap:6px}
.ot-notice-heading{justify-content:space-between;font-size:11px;line-height:1.3}
.ot-notice-heading time{color:var(--muted-color);font-variant-numeric:tabular-nums}
.ot-notice-person{margin-block:3px;flex-wrap:wrap;line-height:1.35}
.ot-notice-person strong{font-size:14px}
.ot-notice-person span{border-radius:1em;padding:1px 6px;background:color-mix(in srgb,var(--focus-color) 13%,transparent);font-size:10px;font-weight:600}
.ot-notice-copy{min-width:0;overflow-wrap:anywhere}
.ot-notice-copy .ot-notice-message{margin:3px 0 0;max-height:min(24vh,9em);overflow:auto;overscroll-behavior:contain;scrollbar-width:none;white-space:pre-line}
.ot-notice-message::-webkit-scrollbar{display:none}
.ot-notice-actions{justify-content:flex-end;gap:8px;margin-top:6px}
.ot-notice-actions button{padding:2px 12px;min-height:26px;border-radius:30px;line-height:1.4;font-family:inherit;font-size:12px;font-weight:600;border:1px solid var(--script-line);background:transparent;color:inherit;cursor:pointer}
.ot-notice-actions .is-accept{color:var(--beauty-on-accent,#fff);background:var(--focus-color);border-color:transparent}
.ot-notice-dismiss{grid-column:1/-1;justify-self:center;display:grid;place-items:center;width:56px;height:15px;margin-bottom:-6px;padding:0;border:0;background:none;color:var(--main-color);cursor:pointer}
.ot-notice-dismiss::after{content:'';width:36px;height:4px;border-radius:6px;background:currentColor;opacity:.24}
.ot-notice-card.is-leaving{opacity:0;pointer-events:none}

/* The dialog receives the active play's palette when it opens. */
.mivo-play-design #script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"])[open]{
    --contact-surface:var(--script-surface,var(--main-bg-color));
    --contact-accent:var(--focus-color);
    --contact-secondary:color-mix(in srgb,var(--main-color) 73%,var(--contact-surface));
    width:min(490px,calc(100% - 16px));max-height:min(820px,calc(100vh - 24px));
    margin:auto;border:1px solid var(--script-line);border-radius:14px;
    color:var(--main-color);background:var(--contact-surface);
}
@supports(height:100dvh){
    .mivo-play-design #script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"])[open]{max-height:min(820px,calc(100dvh - 24px - var(--mivo-cutout-top,env(safe-area-inset-top,0px)) - var(--mivo-cutout-bottom,env(safe-area-inset-bottom,0px))))}
}
.mivo-play-design #script-dialog.is-script-discovery:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-dialog-head{
    flex:none;display:flex;justify-content:center;min-height:50px;padding:8px 50px;
    border-bottom:1px solid var(--script-line);background:var(--contact-surface);
}
.mivo-play-design #script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-dialog-head [data-dialog-close]{border-radius:8px}
.ot-contact-note .script-subtle,.ot-contact-looks .ot-gallery-title small,.ot-contact-story .script-discovery-opinion h3{color:var(--contact-secondary,var(--muted-color))}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-dialog-head h2{font-weight:700;text-align:center}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-body{
    padding:18px clamp(14px,3.3vw,22px);scrollbar-width:none;background:var(--contact-surface);
}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-body::-webkit-scrollbar,
.ot-look-tiles.ot-portrait-rail::-webkit-scrollbar{display:none}
.ot-contact-hero{
    display:grid;grid-template-columns:clamp(78px,23vw,95px) minmax(0,1fr);align-items:start;gap:12px;
}
.ot-contact-avatar{display:grid;gap:5px}
.ot-contact-avatar .script-discovery-portrait{width:100%;aspect-ratio:1;min-height:0}
.ot-contact-avatar .script-discovery-avatar{border:1px solid var(--script-line);border-radius:8px}
.ot-contact-avatar .script-discovery-upload{
    display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:28px;
    padding:3px;border:1px solid var(--script-line);border-radius:7px;background:var(--contact-surface);
    color:var(--contact-accent);font:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;
}
.ot-contact-hero .script-discovery-info{justify-content:flex-start;gap:6px}
.ot-contact-hero .script-discovery-info h3{margin:0;font:inherit;font-size:clamp(19px,4vw,23px);font-weight:700;line-height:1.25}
.ot-contact-hero .script-discovery-relationship{align-self:start;margin:0;padding:2px 7px;border:1px dashed var(--script-line);border-radius:4px;color:var(--contact-secondary,var(--muted-color));font-size:12px}
.ot-contact-tools{position:absolute;left:9px;top:50%;transform:translateY(-50%)}
.ot-contact-tools button{
    display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--script-line);border-radius:8px;
    color:var(--contact-accent);background:var(--contact-surface);cursor:pointer;
}
.ot-contact-note{margin-top:12px}
.ot-contact-note:empty,.ot-contact-note[hidden],.ot-contact-looks[hidden]{display:none}
.ot-contact-note .script-subtle{margin:0;font-size:12px;line-height:1.55}
.ot-contact-tools button:disabled,.ot-contact-looks button:disabled{opacity:.55}
.ot-contact-meters{display:grid;gap:5px;width:100%;margin-top:3px}
.ot-contact-meters .script-discovery-metric{display:grid;grid-template-columns:auto minmax(12px,1fr) 3.4ch;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
.ot-contact-meters .script-discovery-metric strong{font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.2}
.ot-contact-meters progress{
    display:block;width:100%;height:5px;-webkit-appearance:none;appearance:none;border:0;border-radius:6px;
    background:var(--script-line);color:var(--contact-accent);
}
.ot-contact-meters progress::-webkit-progress-bar{border-radius:6px;background:var(--script-line)}
.ot-contact-meters .script-discovery-metric:first-child{--meter-ink:var(--ot-affinity,#be477e)}
.ot-contact-meters .script-discovery-metric:last-child{--meter-ink:var(--ot-friendly,#258566)}
.ot-contact-meters .script-discovery-metric strong{color:var(--meter-ink)}
.ot-contact-meters progress::-webkit-progress-value{border-radius:6px;background:var(--meter-ink)}
.ot-contact-meters progress::-moz-progress-bar{border-radius:6px;background:var(--meter-ink)}
.ot-contact-columns{display:grid;align-items:start;gap:22px;margin-top:22px}
.ot-contact-looks{min-width:0}
.ot-contact-looks header{position:static;display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 12px}
.ot-contact-looks header .but{display:inline-flex;align-items:center;gap:6px;margin:0;padding:5px 10px;border:1px solid var(--script-line);border-radius:12px;background:var(--contact-surface);color:var(--contact-accent)}
.ot-cutout-preview{display:grid;place-items:center;height:min(40vh,320px);overflow:hidden;border-radius:12px;background-color:var(--contact-surface);background-image:repeating-conic-gradient(var(--script-line) 0% 25%,transparent 0% 50%);background-size:16px 16px}
.ot-cutout-preview img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.ot-contact-looks header strong,.ot-contact-story h3,.ot-contact-facts dt{font:inherit;font-size:14px;font-weight:650;color:var(--main-color)}
.ot-portrait-rail{
    display:flex;flex-flow:row nowrap;align-items:flex-start;gap:6px;
    max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;
    padding:3px 2px 5px;scroll-padding-inline:2px;scrollbar-width:thin;
}
.ot-portrait-rail::-webkit-scrollbar{height:4px}
.ot-portrait-rail::-webkit-scrollbar-thumb{border-radius:4px;background:var(--script-line)}
.ot-gallery-title,.ot-gallery-actions{display:flex;align-items:center;gap:8px}
.ot-gallery-title small,.ot-portrait-studio h3 small{font-variant-numeric:tabular-nums;white-space:nowrap}
.ot-gallery-actions{gap:12px}
#script-dialog .ot-gallery-link{
    appearance:none;min-width:0;min-height:36px;padding:4px 1px;margin:0;flex:none;
    border:0;border-radius:2px;background:transparent;box-shadow:none;color:var(--focus-color);
    font:inherit;font-size:13px;font-weight:550;line-height:1.4;white-space:nowrap;cursor:pointer;
}
#script-dialog .ot-gallery-link:disabled{opacity:.45;cursor:default}
#script-dialog .ot-gallery-link:focus-visible,.ot-portrait-rail button:focus-visible{
    outline:2px solid var(--focus-color);outline-offset:1px
}
@media(hover:hover){
    #script-dialog .ot-gallery-link:not(:disabled):hover,#script-dialog .ot-look-detail .but:not(:disabled):hover,
    #script-dialog .ot-portrait-studio :is(.ot-portrait-tools,.ot-pose-toolbar) button:not(:disabled):hover{text-decoration:underline;text-underline-offset:3px}
}
.ot-contact-looks>header{margin-bottom:4px}
.ot-look-tile{
    position:relative;display:grid;justify-items:stretch;align-content:start;gap:5px;min-width:0;max-width:92px;width:100%;
    padding:0;border:0;background:none;color:var(--main-color);font:inherit;font-size:12px;line-height:1.4;text-align:center;cursor:pointer;
}
.ot-look-tile img,.ot-look-tile>svg{
    display:block;box-sizing:border-box;width:100%;height:auto;aspect-ratio:4/5;border:1px solid var(--script-line);border-radius:11px;
    object-fit:cover;object-position:center 25%;background:var(--contact-surface);
}
.ot-look-alpha{position:absolute;right:4px;bottom:23px;padding:1px 5px;border-radius:6px;background:var(--contact-accent);color:var(--beauty-on-accent,#fff);font-size:10px;font-weight:650}
.ot-look-detail{
    display:grid;grid-template-columns:minmax(0,1fr) max-content max-content;grid-template-rows:auto minmax(44px,auto);
    align-items:center;justify-items:start;column-gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid var(--script-line)
}
.ot-contact-looks .ot-look-detail header,.ot-look-actions,.ot-look-stage-row{display:contents}
.ot-look-actions>.but:first-child{grid-area:1/2}
.ot-look-actions>.but:last-child{grid-area:1/3;justify-self:end}
.ot-look-stage-row>.ot-look-preview{grid-area:2/1}
.ot-look-stage-row>.but{grid-area:2/2}
.ot-look-detail .but,.ot-look-pairing .but{margin:0;padding:5px 9px;font-size:12px;border-radius:9px}
.ot-look-form,.ot-look-pairing{display:grid;gap:8px;margin:8px 0}
.ot-look-form .script-field{min-width:0;margin:0}
.ot-look-frames{display:flex;gap:10px}
.ot-look-frame{flex:1;min-width:0;margin:0}
.ot-look-frame figcaption{margin:0 0 5px;font-size:12px;color:var(--muted-color)}
.ot-look-frame .ot-cutout-preview{height:min(30vh,220px)}
.ot-look-pairing{padding-top:10px;border-top:1px solid var(--script-line)}
.ot-look-status{font-size:13px;line-height:1.55}
.ot-look-source{display:grid;gap:10px;min-width:0}
.ot-look-source>.but{margin:0}
#script-dialog .ot-avatar-sheet .ot-look-upload{
    display:grid;justify-self:center;justify-items:center;align-content:center;gap:8px;
    width:min(100%,180px);aspect-ratio:1;box-sizing:border-box;padding:12px;
    border:1.5px dashed var(--contact-accent);border-radius:10px;box-shadow:none;
    background:var(--contact-surface);color:var(--main-color);text-align:center;white-space:normal;
}
.ot-look-add-icon{font-size:26px;line-height:1;font-weight:400;color:var(--contact-accent)}
.ot-look-upload small{font-size:12px;font-weight:400;line-height:1.6;color:var(--main-color);opacity:.78}
.ot-look-source>.ot-look-pairing{margin-bottom:0}
.ot-look-pair-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#script-dialog .ot-look-pair-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;margin:0}
.ot-look-pair-actions svg{width:16px;height:16px;flex:none}
#script-dialog .ot-look-save button{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:42px;margin:0}
.ot-look-pair-actions [aria-busy=true] svg{display:none}
.ot-look-pair-actions [aria-busy=true]::before,.ot-look-save [aria-busy=true]::before{
    content:"";box-sizing:border-box;flex:none;width:15px;height:15px;border:2px solid currentColor;
    border-right-color:transparent;border-radius:50%;animation:ot-look-spin .8s linear infinite;
}
@keyframes ot-look-spin{to{transform:rotate(1turn)}}
@media(prefers-reduced-motion:reduce){
    .ot-look-pair-actions [aria-busy=true]::before,.ot-look-save [aria-busy=true]::before{animation:none}
}
.ot-look-stage-row .ot-look-preview img{width:34px;height:34px;object-fit:contain;border:1px solid var(--script-line);border-radius:6px;background:var(--contact-surface)}
.ot-look-remove-actions{grid-area:2/3;justify-self:end;display:flex;align-items:center;gap:8px;white-space:nowrap}
.ot-avatar-sheet .ot-portrait-form{display:grid;gap:12px;min-width:0}
.ot-avatar-sheet .ot-generated img{max-width:100%;max-height:26vh;object-fit:contain}
.ot-contact-hero .script-status-attribute{--meter-ink:var(--script-attribute-color,var(--contact-accent));min-width:0}
.ot-contact-hero .script-status-attribute small,.ot-contact-hero .script-status-attribute strong{font-size:12px;color:var(--main-color)}
.ot-contact-story .ot-contact-facts button{grid-column:2}
.ot-contact-story .ot-field-choices{margin:0}
.ot-look-status:empty,.ot-look-frames:empty{display:none}
.ot-look-tile[aria-pressed="true"] img,.ot-look-tile[aria-pressed="true"]>svg{border:2px solid var(--contact-accent)}
#script-dialog .ot-look-detail .but:not(.c-theme),#script-dialog .ot-look-preview{
    display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:30px;margin:0;padding:3px 2px;
    border:0;border-radius:3px;box-shadow:none;background:transparent;color:var(--contact-accent);font-size:12px;
}
.ot-look-detail button svg{display:block;width:14px;height:14px;flex:none}
.ot-look-selected{grid-area:1/1;display:flex;align-items:center;gap:4px;min-width:0;overflow-wrap:anywhere}
.ot-look-tiles.ot-portrait-rail{--tile:min(19vw,66px);gap:10px;padding:8px 4px 4px;scrollbar-width:none}
.ot-npc-look-slot,.ot-look-tiles .ot-npc-look-add{position:relative;flex:0 0 var(--tile);width:var(--tile)}
.ot-look-tile>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ot-look-tile[aria-pressed="true"]>span{font-weight:650;color:var(--contact-accent)}
.ot-look-tiles .ot-look-tile{gap:4px;font-size:12px}
.ot-look-tiles .ot-look-tile img,.ot-look-tiles .ot-look-tile>svg,.ot-npc-look-add i{
    width:100%;height:auto;aspect-ratio:1;box-sizing:border-box;border-radius:7px;
}
.ot-npc-look-add i{display:grid;place-items:center;border:1px dashed var(--contact-accent);color:var(--contact-accent);font:400 24px/1 sans-serif}
#script-dialog .ot-look-detail .but.ot-look-delete:not(.c-theme){color:#bd3449}
@supports(color:color-mix(in srgb,red,black)){
    #script-dialog .ot-look-detail .but.ot-look-delete:not(.c-theme){color:color-mix(in srgb,#de304e 64%,var(--main-color))}
}
#script-dialog .ot-look-remove-actions .but{min-height:36px}
.ot-contact-looks{--portrait-rule:var(--script-line);--portrait-paper:var(--contact-surface);--portrait-accent:var(--contact-accent)}
#script-dialog .ot-contact-looks .ot-carry-toggle{min-height:34px;margin:2px 0 0;padding:3px 0;border:0}
.ot-contact-story{display:grid;gap:16px;min-width:0}
.ot-contact-story h3{margin:0 0 6px}
.ot-contact-story .script-discovery-description,.ot-contact-story .script-discovery-opinion p,.ot-contact-request p,.ot-contact-facts dd{
    margin:0;white-space:pre-line;overflow-wrap:anywhere;line-height:1.75;font-size:14px;
}
.ot-contact-bio{padding-inline-start:12px;border-inline-start:3px solid var(--contact-accent)}
.ot-contact-story .script-discovery-opinion{
    margin:0;padding:11px 12px;border:1px dashed var(--script-line);border-radius:8px;background:var(--contact-surface);
}
.ot-contact-request strong{display:block;margin:0 0 5px;font-size:13px}
.ot-contact-story .script-subtle{margin:0;color:var(--muted-color);font-size:12px;line-height:1.6}
.ot-contact-facts{margin:0}.ot-contact-facts dt:not(:first-child){margin-top:12px}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-actions{justify-content:flex-end;padding:10px 22px;background:var(--contact-surface)}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-actions>.but{flex:0 1 auto;min-width:84px;padding-inline:16px;border-radius:12px}
.ot-look-tile:focus-visible,.ot-contact-tools button:focus-visible{outline:2px solid var(--contact-accent);outline-offset:2px}
#script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-actions:empty{display:none}
@media(max-width:640px){
    .ot-contact-columns{gap:12px;margin-top:15px}
    #script-dialog:is([aria-describedby="ot-contact-name"],[aria-describedby="ot-personal-name"]) .script-discovery-actions{padding:8px 14px}
}

/* Keep the action sheet inside the visual viewport while the keyboard is open. */
.ot-shell.ot-fullscreen[data-view="actions"] {top:var(--ot-edit-top,0px);height:var(--ot-edit-height,auto)}
.ot-reader-controls {position:relative;flex:none;display:grid;grid-template-columns:1fr auto 1fr;gap:5px 8px;align-items:center;pointer-events:none}
.ot-reader-page {grid-area:2/2;justify-self:center;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ot-ink);text-shadow:var(--ot-text-shadow)}
.ot-reader-hint {grid-area:1/1/2/4;margin-bottom:2px;text-align:center;font-size:12px;line-height:1.4;color:var(--ot-ink);text-shadow:var(--ot-text-shadow)}
.ot-open-actions {grid-area:2/3;justify-self:end;display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:6px 12px;border:1px solid #fff7;border-radius:20px;background:rgba(23,24,36,.85);color:var(--ot-ink);font:inherit;font-size:13px;white-space:nowrap}
.ot-open-actions svg {width:15px;height:15px}
.ot-reader-controls>button {pointer-events:auto}
.ot-reader-back {grid-area:2/1;justify-self:start;min-height:36px;padding:4px 2px;border:0;background:transparent;box-shadow:none;color:var(--ot-ink);font:inherit;font-size:13px;text-shadow:var(--ot-text-shadow)}
.ot-reader-back:hover:not(:disabled) {text-decoration:underline}
.ot-main-action-compose {
    display:flex;align-items:center;gap:8px;margin:0;padding:4px 5px 4px 15px;min-height:46px;
    color:var(--main-color);background:var(--script-surface);border:1px solid var(--script-line);
    border-radius:16px;box-shadow:0 3px 14px #0002;
}
.ot-main-action-compose:focus-within {border-color:var(--ot-accent)}
.mivo-play-design .ot-main-action-compose .script-input {
    flex:1;min-width:0;width:auto;margin:0;padding:4px 0;border:0;border-radius:0;box-shadow:none;outline:none;
    font-family:inherit;font-size:16px;line-height:1.4;color:var(--main-color);background:transparent;
}
.ot-main-action-compose input::placeholder {color:var(--muted-color)}
.ot-action-send {
    flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:12px;
    background:var(--ot-accent);color:var(--beauty-on-accent,#fff);
}
.ot-action-send svg {width:19px;height:19px}
.ot-action-send:disabled {color:var(--muted-color);background:var(--muted-bg-color);opacity:.8}
@media(max-height:500px) {
    .ot-reader-back {min-height:28px}
    .ot-main-action-compose {min-height:40px;padding-block:2px}
}
/* Reserve the decision screen for the choices. Supporting details expand on demand. */
.ot-relation-list {display:grid;gap:6px}
.ot-shell.ot-fullscreen[data-view="actions"] {container:ot-decisions / size}
.ot-fullscreen>.ot-actions {width:min(520px,calc(100% - 20px));max-height:none;margin-bottom:6px;background:transparent;border:0;border-radius:0;box-shadow:none}
.ot-fullscreen .ot-action-scroll {gap:5px;padding:2px 2px 4px}
.ot-fullscreen .ot-turn-relations {display:block;padding:0 9px;border:1px solid var(--script-line);border-radius:8px;background:var(--script-surface);color:var(--main-color)}
.ot-turn-relations summary {display:flex;align-items:center;gap:8px;min-height:30px;font-size:12px;cursor:pointer;list-style:none}
.ot-turn-relations summary::-webkit-details-marker {display:none}
.ot-turn-relations summary strong {flex:none}
.ot-relation-preview {flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted-color)}
.ot-turn-relations summary svg {width:14px;height:14px;flex:none}
.ot-turn-relations[open] summary svg {transform:rotate(180deg)}
.ot-turn-relations[open] .ot-relation-list {padding:3px 0 8px}
.ot-fullscreen .ot-turn-cast {display:flex;align-items:center;gap:7px}
.ot-fullscreen .ot-turn-cast h3 {flex:none;color:var(--ot-ink);font-size:12px;text-shadow:var(--ot-text-shadow)}
.ot-fullscreen .ot-turn-people {display:flex;min-width:0;gap:4px;overflow-x:auto;overscroll-behavior-inline:contain}
.ot-fullscreen .ot-turn-people button {flex:none;max-width:12em;gap:5px;min-height:30px;padding:2px 7px 2px 3px;border:1px solid var(--script-line);border-radius:7px;background:var(--script-surface);font-size:12px}
.ot-fullscreen .ot-turn-people strong {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ot-fullscreen .ot-turn-people .ot-cast-avatar {width:23px;height:23px;border-radius:5px;font-size:12px}
.ot-decision-head {display:flex;align-items:center;justify-content:space-between;gap:8px}
.ot-fullscreen .ot-decision-heading,.ot-fullscreen .ot-action-scroll>h3,.ot-fullscreen .ot-action-scroll>p {margin:0;color:var(--ot-ink);text-shadow:var(--ot-text-shadow)}
.ot-return-reading {display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:30px;padding:3px 9px 3px 6px;border:1px solid #fff6;border-radius:20px;background:#211f2bc9;color:var(--ot-ink);font:inherit;font-size:12px;line-height:1.3}
.ot-return-reading svg {width:13px;height:13px;transform:rotate(90deg)}
.ot-fullscreen .ot-decisions {gap:4px}
.ot-fullscreen .ot-choice-row,.ot-fullscreen .ot-main-action-compose {background:rgba(23,24,36,.88);border:1px solid #ffffff70;border-radius:8px;color:var(--ot-ink);box-shadow:none}
.ot-fullscreen .ot-choice-row {grid-template-columns:minmax(0,1fr) 34px;gap:0}
.mivo-play-design .ot-fullscreen .ot-choice-row>.but,.ot-fullscreen .ot-edit-choice {background:transparent;border:0;color:inherit}
.mivo-play-design .ot-fullscreen .ot-choice-row>.but {min-height:36px;min-width:0;padding:5px 8px;font-size:13px;line-height:1.4}
.ot-fullscreen .ot-choice-text {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.ot-fullscreen .ot-edit-choice {padding:4px}
.ot-fullscreen .ot-edit-choice svg {width:14px;height:14px}
.ot-fullscreen .ot-main-action-compose {min-height:38px;padding:2px 3px 2px 10px}
.ot-fullscreen .ot-action-send {width:32px;height:32px;border-radius:6px}
.mivo-play-design .ot-fullscreen .ot-main-action-compose .script-input,.ot-fullscreen .ot-action-send:disabled {color:var(--ot-ink)}
.ot-fullscreen .ot-main-action-compose input::placeholder {color:#dddce2}
.ot-fullscreen .ot-action-footer {display:flex;justify-content:flex-end;padding:3px 2px;background:transparent;border:0}
@container ot-decisions (max-height:640px) {
    .ot-fullscreen .ot-choice-text {-webkit-line-clamp:2}
}
@container ot-decisions (min-width:520px) and (max-height:500px) {
    .ot-shell.ot-fullscreen>.ot-actions {max-width:none;width:min(760px,calc(100% - 24px));margin-bottom:4px}
    .ot-fullscreen .ot-decisions {grid-template-columns:repeat(2,minmax(0,1fr))}
}
.ot-shell.ot-menu-open>.ot-head{z-index:7}
.ot-stage-tools{position:relative;display:flex;flex:none;align-items:center;margin-inline-start:auto;padding:2px;border:1px solid var(--script-line);border-radius:24px;background:var(--script-surface);color:var(--main-color);box-shadow:0 2px 8px #0002}
.ot-stage-tools>.nowave{display:inline-flex;align-items:center;justify-content:center;height:34px;color:inherit;font:inherit;font-size:13px;border:0;background:transparent;border-radius:20px}
.ot-stage-home{width:36px}
.ot-stage-home .fa-home{font-size:17px}
.ot-stage-tools>.ot-stage-toggle{position:relative;gap:5px;padding:0 9px}
.ot-stage-toggle::before{content:"";position:absolute;inset-inline-start:0;width:1px;height:14px;background:var(--script-line)}
.ot-stage-toggle svg{width:12px;height:12px}
.ot-stage-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
.ot-shell>.ot-head .ot-player-line{gap:3px 6px}
.ot-shell>.ot-head .ot-player-attributes{gap:3px}
.ot-shell>.ot-head .ot-player-name{max-width:clamp(72px,22vw,140px)}
.ot-menu-sheet{position:absolute;top:calc(100% + 6px);inset-inline-end:0;display:grid;gap:6px;box-sizing:border-box;width:264px;max-width:calc(100vw - 24px);max-height:calc(100vh - 78px);max-height:calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:7px;border:1px solid var(--script-line);border-radius:13px;background:var(--script-surface);color:var(--main-color);box-shadow:0 8px 26px #0003;overflow-y:auto;overscroll-behavior:contain;text-shadow:none}
.ot-menu-sheet{scrollbar-width:none}
.ot-menu-sheet::-webkit-scrollbar{display:none}
.ot-rotate svg {transform:rotate(90deg)}
.ot-rotate .ot-to-portrait {display:none}
#mivo-creation-toast[data-ot-rotate-to] .notyf {display:grid;justify-items:center;gap:8px}
#mivo-creation-toast[data-ot-rotate-to] svg {width:30px;height:30px;transform:rotate(90deg)}
#mivo-creation-toast[data-ot-rotate-to="portrait"] svg {transform:none}
@media (prefers-reduced-motion:no-preference) {
    #mivo-creation-toast[data-ot-rotate-to] svg {animation:ot-guide-turn 1.25s ease-in-out both}
    #mivo-creation-toast[data-ot-rotate-to="portrait"] svg {animation-direction:reverse}
}
@keyframes ot-guide-turn {0%,15%{transform:rotate(0)} 85%,100%{transform:rotate(90deg)}}
@media (orientation:landscape) {
    .ot-rotate svg {transform:none}
    .ot-rotate .ot-to-landscape, #mivo-creation-toast[data-ot-rotate-to="landscape"] {display:none}
    .ot-rotate .ot-to-portrait {display:inline}
}
@media (orientation:portrait) {
    #mivo-creation-toast[data-ot-rotate-to="portrait"] {display:none}
}
.ot-menu-item:disabled{opacity:.45}
.ot-event-index{color:var(--main-color)}
.ot-event-index h3,.ot-event-index summary{margin:0;font-size:14px;font-weight:650}
.ot-event-index summary{display:flex;align-items:center;justify-content:space-between;min-height:44px}
.ot-event-index summary::-webkit-details-marker{display:none}
.ot-event-index summary svg{width:16px;height:16px;transform:rotate(-90deg)}
.ot-event-index details[open]>summary svg{transform:none}
.ot-event-index .ot-event-entry{padding:10px 4px}
.ot-event-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;color:var(--muted-color)}
.ot-event-blank{display:grid;justify-items:center;gap:8px;text-align:center;padding:18px 8px}
.ot-event-blank>svg{width:24px;height:24px;color:var(--focus-color)}
.ot-event-blank p{margin:0;color:var(--muted-color)}
.ot-event-blank button{min-height:40px}
.ot-shell .ot-event-scene-name{display:flex;justify-self:start;align-self:flex-start;gap:5px;align-items:center;max-width:100%;min-width:0;margin:0;padding:3px 9px;border-radius:10px;color:var(--main-color);background:var(--script-surface);font-size:13px;pointer-events:none}
.ot-event-scene-name svg{flex:none;width:14px;height:14px;color:var(--focus-color)}
.ot-event-scene-name span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ot-menu-sheet[hidden]{display:none}
.ot-menu-sheet button {display:flex;align-items:center;gap:7px;min-width:0;padding:6px 7px;min-height:38px;border:0;background:transparent;color:var(--main-color);font:inherit;font-size:13px;line-height:1.4;text-align:start;border-radius:8px}
.ot-menu-sheet svg {width:18px;height:18px;flex:none}
.ot-menu-sheet .ot-menu-auto {gap:11px;padding:11px 12px;background:var(--script-surface);background:color-mix(in srgb,var(--main-color) 6%,var(--script-surface));color:var(--main-color);font-weight:650}
.ot-auto-switch {box-sizing:border-box;display:flex;align-items:center;margin-inline-start:auto;width:36px;height:22px;border:1px solid currentColor;border-radius:20px;padding:3px}
.ot-auto-switch::before {content:"";width:14px;height:14px;background:currentColor;border-radius:50%}
.ot-menu-auto[aria-checked="true"] .ot-auto-switch {justify-content:flex-end;background:currentColor}
.ot-menu-auto[aria-checked="true"] .ot-auto-switch::before {background:var(--script-surface)}
.ot-menu-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 4px}
.ot-menu-grid svg {color:var(--focus-color)}
.ot-menu-item:hover,.ot-menu-item:focus-visible {background:var(--muted-bg-color)}
.ot-menu-exit {display:flex;justify-content:flex-end;padding-top:5px;border-top:1px solid var(--script-line)}
.mivo-play-design .ot-menu-exit>.script-exit {position:static;display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:4px 8px;margin:0;transform:none;border:0;box-shadow:none;background:transparent;color:var(--muted-color)}

.ot-contact-hero.is-editing{align-items:start}
.ot-contact-edit-identity,.ot-contact-edit-prose{display:grid;gap:10px;min-width:0}
.ot-contact-edit-identity{grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr))}
.ot-contact-hero.is-editing .script-discovery-info{gap:12px}
.ot-contact-edit-identity .script-field,.ot-contact-edit-prose .script-field{margin:0;min-width:0}
.ot-avatar-sheet[open]{
    display:flex;flex-direction:column;position:fixed;inset:0;width:min(450px,calc(100% - 28px));box-sizing:border-box;
    max-height:calc(100% - 32px);max-height:min(760px,calc(100dvh - 32px));margin:auto;padding:0;
    color:var(--main-color);background:var(--contact-surface);border:1px solid var(--script-line);border-radius:18px;box-shadow:0 18px 70px #0004;
}
.ot-avatar-sheet::backdrop{background:rgba(15,17,26,.48)}
.ot-avatar-sheet [hidden],.ot-contact-tools[hidden],.ot-contact-hero h3[hidden]{display:none!important}
.ot-avatar-sheet>header{position:static;display:flex;align-items:center;justify-content:space-between;flex:none;padding:12px 18px 6px}
.ot-avatar-sheet>header h2{font:inherit;font-size:18px;font-weight:650;margin:0}
.ot-avatar-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;color:var(--muted-color);background:transparent}
.ot-avatar-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ot-avatar-tabs{display:flex;flex:none;gap:4px;margin:3px 18px 0;padding:3px;border-radius:12px;background:var(--contact-surface);background:color-mix(in srgb,var(--script-line) 24%,var(--contact-surface))}
#script-dialog .ot-avatar-tabs .but{flex:1;margin:0;border:0;border-radius:9px;min-height:34px;background:transparent;color:var(--main-color);box-shadow:none}
#script-dialog .ot-avatar-tabs .but[aria-pressed=true]{color:var(--main-color);background:var(--contact-surface);box-shadow:0 1px 4px #0002;font-weight:650}
.ot-avatar-editor{display:grid;gap:12px;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:14px 18px 18px}
.ot-avatar-editor::-webkit-scrollbar{display:none}
.ot-avatar-editor .script-field,.ot-avatar-editor p{margin:0}
.ot-avatar-source,.ot-avatar-ai,.ot-avatar-refs{display:grid;gap:12px;min-width:0}
#script-dialog .ot-avatar-drop{display:grid;justify-items:center;align-content:center;gap:6px;width:100%;min-height:145px;margin:0;
    border:1px dashed var(--contact-accent);border-radius:13px;background:var(--contact-surface);background:color-mix(in srgb,var(--script-line) 24%,var(--contact-surface));color:var(--main-color)}
.ot-avatar-drop i{font-size:24px;color:var(--contact-accent)}.ot-avatar-drop small,.ot-avatar-status{color:var(--main-color);font-size:12px}
.ot-avatar-drop img,.ot-avatar-reference img{width:66px;height:66px;object-fit:cover;border-radius:9px}
.ot-avatar-editor .cover-form-field{min-width:0;margin:0;padding:0;border:0}
.ot-avatar-editor legend,.ot-avatar-refs>strong{width:auto;padding:0;border:0;color:var(--main-color);margin:0 0 5px;font:inherit;font-size:13px;font-weight:600}
.ot-avatar-editor .cover-choices{display:flex;gap:5px;flex-wrap:wrap}
#script-dialog .ot-avatar-editor .cover-choices button{
    display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:5px 9px;
    font:inherit;font-size:12px;color:var(--main-color);border:1px solid var(--script-line);border-radius:8px;background:var(--contact-surface)
}
#script-dialog .ot-avatar-editor .cover-choices button::before{
    content:"";width:9px;height:5px;box-sizing:border-box;border:solid currentColor;border-width:0 0 2px 2px;
    transform:translateY(-1px) rotate(-45deg);visibility:hidden
}
#script-dialog .ot-avatar-editor .cover-choices button[aria-pressed=true]{
    background:var(--main-color);color:var(--contact-surface);border-color:var(--main-color);font-weight:650
}
#script-dialog .ot-avatar-editor .cover-choices button[aria-pressed=true]::before{visibility:visible}
.ot-avatar-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px}
.ot-avatar-sheet>.ot-avatar-actions{flex:none;padding:10px 18px;border-top:1px solid var(--script-line)}
.ot-avatar-refs>.ot-avatar-actions{justify-content:flex-start}
.ot-avatar-result:empty,.ot-avatar-editor p:empty,.ot-avatar-actions:empty,.ot-avatar-reference:empty{display:none}
.ot-avatar-result img{display:block;margin:auto;max-width:100%;width:auto;height:auto;max-height:200px;object-fit:contain;border-radius:12px}


/* The identity in the story HUD opens a vertically stacked player record. */
.mivo-play-design #script-dialog.is-script-discovery[aria-describedby="ot-personal-name"] .script-dialog-head{
    justify-content:flex-start;align-items:center;gap:8px;min-height:68px;padding:9px 10px 9px 16px;
}
.mivo-play-design #script-dialog.is-script-discovery[aria-describedby="ot-personal-name"] .script-dialog-head > [data-dialog-close]{position:static;transform:none;margin:0}
#script-dialog[aria-describedby="ot-personal-name"] .script-dialog-head h2{flex:1;min-width:0;text-align:start}
.ot-personal-identity{display:flex;align-items:center;gap:12px;min-width:0}
.ot-personal-identity .ot-personal-pencil{
    display:inline-grid;place-items:center;flex:none;box-sizing:border-box;width:34px;height:34px;padding:0;margin-inline-start:auto;
    border:1px solid var(--sheet-lip,var(--script-line));border-radius:6px;color:var(--sheet-ink,var(--main-color));
    background:var(--sheet-face),var(--sheet-paper);box-shadow:var(--sheet-raised);cursor:pointer;
}
.ot-personal-pencil>svg{display:block;width:16px;height:16px}
.ot-personal-pencil[aria-pressed="true"]{box-shadow:var(--sheet-pressed);color:var(--contact-accent)}
.ot-personal-pencil:focus-visible{outline:2px solid var(--contact-accent);outline-offset:2px}
.ot-personal-fields{display:grid;gap:8px;min-width:0;margin:0;padding:6px 0;border:0}
.ot-personal-fields .script-field{min-width:0;margin:0}
.ot-personal-fields .script-input{box-sizing:border-box;width:100%;min-width:0;margin:0}
.ot-personal-fields .ot-field-choices{min-width:0;margin:0}
.ot-personal-edit-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:6px 0}
.ot-personal-edit-actions .but{min-height:36px;margin:0}
.ot-personal-identity .script-discovery-avatar-action{flex:none}
.ot-personal-identity .script-discovery-upload{width:48px;height:48px;min-height:0;padding:0;overflow:hidden;border-radius:9px}
.ot-personal-identity .script-discovery-portrait{display:block;width:100%;height:100%;min-height:0}
.ot-personal-identity .script-discovery-avatar{border:0;border-radius:inherit}
.ot-personal-name{min-width:0;min-height:40px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-size:19px;font-weight:700;text-align:start;overflow-wrap:anywhere;cursor:pointer}
.ot-personal-sections{display:grid;gap:12px;min-width:0}
.ot-personal-card,.ot-personal-sections>.ot-contact-looks{
    min-width:0;margin:0;padding:12px;border:1px solid var(--script-line);border-radius:10px;background:var(--contact-surface);
}
.ot-personal-card h3,.ot-personal-info>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;color:var(--main-color);font:inherit;font-size:14px;font-weight:650}
.ot-personal-card h3{margin-bottom:9px}
.ot-personal-card h3>span{display:inline-flex;align-items:center;gap:7px}
.ot-personal-card h3>small{padding:1px 6px;border:1px solid var(--script-line);border-radius:6px;font-size:11px}
.ot-personal-card :is(svg,.fa){width:16px;height:16px;flex:none;color:var(--contact-accent)}
.ot-personal-info>summary{min-height:30px;cursor:pointer;list-style:none}
.ot-personal-info>summary::-webkit-details-marker{display:none}
.ot-personal-info:not([open])>summary svg{transform:rotate(-90deg)}
.ot-personal-row{display:flex;align-items:center;gap:7px;width:100%;min-height:45px;margin:0;padding:9px 0;box-sizing:border-box;border:0;background:transparent;color:var(--main-color);text-align:start;font:inherit;font-size:13px}
.ot-personal-row+.ot-personal-row{border-top:1px solid var(--script-line)}
button.ot-personal-row{cursor:pointer}
.ot-personal-row strong{min-width:0;max-width:52%;margin-inline-start:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.ot-personal-row .but{flex:none;margin:0;padding:3px 8px;font-size:12px;border:1px solid var(--script-line);border-radius:6px}
.ot-personal-row svg:last-child{width:12px}
.ot-personal-stats,.ot-personal-bag{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.ot-personal-chip{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0;min-height:32px;padding:6px 8px;box-sizing:border-box;border:1px solid var(--script-line);border-radius:7px;color:var(--main-color);font-size:13px;line-height:1.35;overflow-wrap:anywhere}
@supports(background:color-mix(in srgb,red,white)){.ot-personal-chip{background:color-mix(in srgb,var(--contact-accent) 5%,var(--contact-surface))}}
.ot-personal-chip strong{font-weight:650;font-variant-numeric:tabular-nums}
.ot-personal-bag strong{margin-inline-start:auto}
.ot-personal-stats .script-status-attribute{display:grid;align-content:center;gap:5px;min-width:0;padding:7px 8px;box-sizing:border-box;border:1px solid var(--script-line);border-inline-start:3px solid var(--script-attribute-color);border-radius:7px;background:var(--contact-surface)}
.ot-personal-stats .script-status-attribute>span{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px}
.ot-personal-stats .script-status-attribute :is(small,strong){color:var(--main-color);font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.ot-personal-stats .script-status-attribute strong{min-width:0;max-width:8ch;text-align:end;font-variant-numeric:tabular-nums}
.ot-personal-stats .script-status-attribute progress{width:100%;height:5px;margin:0;background:var(--script-line);accent-color:var(--script-attribute-color)}
.ot-personal-stats progress::-webkit-progress-bar{background:var(--script-line)}
.ot-personal-sections .ot-carry-toggle{width:100%}
.ot-personal-name:focus-visible,.ot-personal-row:focus-visible,.ot-personal-info>summary:focus-visible{outline:2px solid var(--contact-accent);outline-offset:2px}
