/* Line 5060 (own-the-stage-shared-kit-r1): the one left-side container, <x-own-the-stage>.
   The host LEFT in a plane with a border the visitor drags (--ns-own-host, 26% by default), the page
   RIGHT; at 767 px and under the page is on top and the host is a living strip at the bottom.
   Colours and timings are the stage tokens of public/css/stage-tokens.css, read with their own values
   as fallbacks (the tokens are scoped to .game-stage; this file never redefines a house token). */
.ns-own { position: relative; display: flex; flex-direction: row; align-items: stretch; width: 100%; min-height: 70vh; background: var(--ns-stage-void, #060610); color: var(--ns-stage-ink, #f0f0f5); isolation: isolate; }
.ns-own[data-ns-own-side="right"] { flex-direction: row-reverse; }
.ns-own-host { position: relative; flex: 0 0 var(--ns-own-host, 26%); min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--ns-stage-set, #0e1322); border-right: 1px solid var(--ns-stage-border, #1f2940); overflow: hidden; }
.ns-own[data-ns-own-side="right"] .ns-own-host { border-right: 0; border-left: 1px solid var(--ns-stage-border, #1f2940); }
.ns-own-face { position: relative; flex: 1 1 auto; min-height: 160px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 12px; overflow: hidden; background: var(--ns-stage-spot, radial-gradient(ellipse at center, rgba(242,181,68,.10), transparent 72%)); }
.ns-own-face img, .ns-own-face video, .ns-own-face canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.ns-own-tag { margin: 0; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--ns-stage-ink, #f0f0f5); background: var(--ns-stage-glass, rgba(16,27,48,.92)); }
.ns-own-line { margin: 0; padding: 8px 10px; font-size: 14px; color: var(--ns-stage-ink, #f0f0f5); background: var(--ns-stage-set-2, #141b30); border-left: 3px solid var(--ns-stage-accent, #f2b544); border-radius: 6px; }
.ns-own-bar { display: flex; gap: 8px; }
.ns-own-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 auto; min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--ns-stage-accent, #f2b544); border-radius: 999px; background: transparent; color: var(--ns-stage-ink, #f0f0f5); font: inherit; font-weight: 800; cursor: pointer; }
.ns-own-btn:hover, .ns-own-btn:focus-visible { background: var(--ns-stage-accent, #f2b544); color: var(--ns-stage-void, #060610); outline: none; box-shadow: var(--ns-stage-elev-2, 0 8px 30px rgba(0,0,0,.5)); }
.ns-own-btn[aria-pressed="true"] { background: var(--ns-stage-accent, #f2b544); color: var(--ns-stage-void, #060610); }
.ns-own-splitter { flex: 0 0 10px; cursor: col-resize; touch-action: none; user-select: none; display: flex; align-items: center; justify-content: center; background: var(--ns-stage-set-2, #141b30); }
.ns-own-splitter:hover, .ns-own-splitter:focus-visible { background: var(--ns-stage-accent, #f2b544); outline: none; }
.ns-own-nub { width: 4px; height: 40px; border-radius: 2px; background: var(--ns-stage-ink-2, #b8c5db); }
.ns-own-content { position: relative; flex: 1 1 auto; min-width: 0; overflow: auto; }
.ns-own-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }

/* she owns the stage: her corner folds away and the page takes the full width */
.ns-own[data-ns-own-state="owned"] .ns-own-host,
.ns-own[data-ns-own-state="owned"] .ns-own-splitter { display: none; }
.ns-own.ns-own-anim .ns-own-content { transition: opacity var(--ns-stage-dur-scene, 420ms) ease; }
.ns-own.ns-own-fade .ns-own-content { transition: opacity 200ms linear; }

/* the way back: always visible, above the stage (the engine lifts it into the top layer) */
.ns-own-pill { position: fixed; top: 12px; right: 12px; left: auto; bottom: auto; margin: 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--ns-stage-border, #1f2940); border-radius: 999px; background: var(--ns-stage-glass, rgba(16,27,48,.92)); color: var(--ns-stage-ink, #f0f0f5); box-shadow: var(--ns-stage-elev-1, 0 8px 30px rgba(0,0,0,.5)); z-index: 2147483001; }
.ns-own-pill[hidden] { display: none; }
.ns-own-pill[data-stage-suspended] { visibility: hidden; }
.ns-own-pill-text { font-size: 14px; font-weight: 700; }
.ns-own-pill-back { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ns-stage-accent, #f2b544); color: var(--ns-stage-void, #060610); font: inherit; font-weight: 800; cursor: pointer; }
.ns-own-pill-back:focus-visible { outline: 2px solid var(--ns-stage-ink, #f0f0f5); outline-offset: 2px; }

/* the stage's shoulder menu (slotted into <netshow-stage>) */
netshow-stage[data-ns-own] .ns-own-badge { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ns-stage-glass, rgba(16,27,48,.92)); color: var(--ns-stage-ink, #f0f0f5); cursor: pointer; }
netshow-stage[data-ns-own] .ns-own-menu { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: var(--ns-stage-glass, rgba(16,27,48,.92)); }
netshow-stage[data-ns-own] .ns-own-menu[hidden] { display: none; }
netshow-stage[data-ns-own] .ns-own-menu button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ns-stage-ink, #f0f0f5); font: inherit; text-align: left; cursor: pointer; }
netshow-stage[data-ns-own] .ns-own-menu button:hover, netshow-stage[data-ns-own] .ns-own-menu button:focus-visible { background: var(--ns-stage-set-2, #141b30); outline: none; }
netshow-stage[data-ns-own] .ns-own-tag { font-size: 12px; }

/* a phone: the page on top, the host a living strip at the bottom */
@media (max-width: 767px) {
    .ns-own, .ns-own[data-ns-own-side="right"] { flex-direction: column; min-height: 0; }
    .ns-own-content { order: 1; overflow: visible; }
    .ns-own-splitter { display: none; }
    .ns-own-host { order: 2; position: sticky; bottom: 0; z-index: 2; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--ns-stage-border, #1f2940); }
    .ns-own-face { flex: 0 0 72px; width: 72px; height: 96px; min-height: 0; }
    .ns-own-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .ns-own-line { position: absolute; left: 12px; right: 12px; bottom: 100%; }
    .ns-own-bar { flex: 1 1 auto; }
    .ns-own-pill { left: 12px; right: 12px; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
    .ns-own.ns-own-anim .ns-own-content { transition: opacity 200ms linear; }
}
/* Line 8294 (agent-page-phone-stage-full-width-r1): the agent page on a phone, behind
   ai.features.agent_page_phone_stage_full_width (the partial adds .ns-own-page--phone-full). The host plane
   stacks as a full-width column: her face first at about 45vh, the owned-avatar rail with its Talk door and
   composer full width under it, the Own the stage / Look / Voice bar one row of 44 px pills. Every rule is
   scoped to that class and the agent_page container: every other surface keeps its 72 px strip. */
@media (max-width: 767px) {
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-own-host { order: 0; position: relative; bottom: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; padding: 12px; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-own-content { order: 1; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-own-face { flex: none; width: 100%; height: auto; min-height: 0; max-height: none; overflow: visible; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] [data-ns-own-page-face] { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; width: 100%; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] [data-ns-own-page-face] .agent-hero__avatar { align-self: center; width: min(45vh, 100%); }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-stage__viewport { min-height: 45svh; min-height: 45dvh; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-own-bar { flex: none; flex-wrap: nowrap; width: 100%; }
    .ns-own-page--phone-full .ns-own[data-ns-own="agent_page"] .ns-own-btn { flex: 1 1 auto; gap: 6px; min-width: 0; min-height: 44px; padding: 0 10px; }
}
