/* OG talking picture — call showcase (ticket og-talking-pictures-wiring-2026-10-31).
   The showcase is a SWITCHED screen state: while body.og-showcase-on is set,
   #ogShowcase is the only screen — the app behind it is hidden, never stacked
   under or over the call. The clip is muted on purpose: OG's live voice comes
   from the existing voice stack, not the clip's baked-in preset voice. */

/* Phone button — TOP-RIGHT (placement law, ticket 2026-10-31; Brent
   2026-11-01 01:08: "at the top somewhere on the right side on og").
   The button lives in the .og-topbar header now, in the right cluster
   beside the pencil — the page's button, not the hero's: visible and
   tappable in the empty state AND in a conversation (its old home
   inside #emptyState hid it the moment a chat started, and mid-screen
   is where the reconnect chip used to sit on it). It started at the
   header's own 42px circle grammar, in OG gold so it reads as the
   call button among the dark utility circles; the text label gives
   way to the glyph (the aria-label keeps the full name).
   (Appearance expansion, 2026-11-11 — Brent: "make OG a half a
   bubble bigger, the phone button": the button was 63px —
   half again the 42px circle — with the glyph scaled in step,
   20px -> 30px. SUPERSEDED 2026-11-14 — Brent's text-screen
   order: the call button goes back to the pencil's exact size
   (42px, glyph 21px) and the big 63px size moves to OG's own
   medallion in the presence header (og_chat_board.css) — on
   the text screen the call button must not outsize OG.)
   Placement mechanics, all honest flex: the topbar is
   flex/space-between, so margin-left:auto on this button absorbs the
   free space and clusters it with the pencil at the right edge —
   the menu keeps the left edge untouched and the pencil keeps its
   exact spot, with the bar's own 12px gap between the two circles.
   pointer-events:auto because the topbar itself is pointer-events:
   none — its circle buttons opt back in the same way (og_shell.css).
   During a call the header stands down with the rest of the app
   (the showcase switch) — the hang-up lives on the call screen. */
.og-call-btn{display:grid;place-items:center;width:42px;height:42px;margin:0 0 0 auto;padding:0;border:none;border-radius:50%;background:linear-gradient(135deg,#ffc107,#ff8f00);color:#111;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.5);pointer-events:auto;flex:0 0 auto}
.og-call-btn svg{width:21px;height:21px}
.og-call-btn span{display:none}
.og-call-btn:hover{box-shadow:0 0 0 3px rgba(255,193,7,.25),0 6px 18px rgba(0,0,0,.5)}

/* Muse-style call picture-in-picture: the conversation stays visible
   while the portrait and call controls float above its lower-right corner. */
#ogShowcase{position:fixed;right:clamp(12px,2.6vw,24px);bottom:calc(136px + env(safe-area-inset-bottom));z-index:9900;width:min(180px,44vw);height:min(250px,36vh);min-height:210px;display:block;overflow:visible;background:transparent;pointer-events:none}
#ogShowcase[hidden]{display:none}
.og-callstage{position:absolute;inset:0;display:block;text-align:left;padding:0;border:1px solid rgba(141,184,255,.58);border-radius:22px;overflow:hidden;background:linear-gradient(155deg,#1b315b 0%,#101d39 64%,#0a142b 100%);box-shadow:0 18px 42px rgba(0,7,24,.55),0 0 22px rgba(69,145,255,.2);pointer-events:auto}
.og-stage-pic{position:absolute;inset:0;width:auto;height:auto;border-radius:21px;overflow:hidden;background:radial-gradient(ellipse at 50% 22%,#38547a,#132342 62%,#0a142b);box-shadow:none}
.og-stage-still{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;object-position:50% 12%;border-radius:inherit;display:block}
#ogTalkVideo{position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 12%;border-radius:inherit;background:#132342;opacity:0;transition:opacity .25s ease}
#ogTalkVideo.og-painted{opacity:1}
.og-stage-act{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:cover;object-position:50% 16%;border-radius:inherit}
.og-stage-clip{position:absolute;inset:0;z-index:3;width:100%;height:100%;object-fit:cover;object-position:50% 16%;border-radius:inherit;opacity:0;transition:opacity .25s ease;pointer-events:none}
.og-stage-clip.og-painted{opacity:1}
@media (prefers-reduced-motion: reduce){.og-stage-clip{display:none!important}}
.og-callstage:after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:linear-gradient(180deg,rgba(5,14,32,.66),transparent 28%,transparent 58%,rgba(5,14,32,.84))}
.og-showcase-name{position:absolute;z-index:4;top:11px;left:12px;right:12px;margin:0;color:#fff;font-weight:700;font-size:.82rem;letter-spacing:.2px;text-shadow:0 1px 4px rgba(0,0,0,.7)}
.og-showcase-status{position:absolute;z-index:4;top:31px;left:12px;right:12px;margin:0;color:#d4e5ff;font-size:.68rem;font-weight:600;min-height:1.1em;text-shadow:0 1px 4px rgba(0,0,0,.7)}
.og-stage-transcript,.og-stage-compose{display:none!important}
.og-call-pill{position:absolute;left:50%;bottom:8px;top:auto;right:auto;transform:translateX(-50%);z-index:5;display:flex;flex-direction:row;align-items:center;gap:2px;padding:4px;border:1px solid rgba(204,224,255,.56);border-radius:999px;background:rgba(235,243,255,.94);box-shadow:0 8px 24px rgba(0,0,0,.42);backdrop-filter:blur(12px);pointer-events:auto}
.og-call-pill button{width:38px;height:38px;border:none;border-radius:50%;background:transparent;color:#172746;display:grid;place-items:center;cursor:pointer;padding:0}
.og-call-pill button svg{width:21px;height:21px}
.og-call-pill button:hover{background:rgba(26,53,96,.10)}
#ogEndCallBtn{color:#fff;background:#d94b58}
#ogEndCallBtn:hover{background:#c73847}
#ogCsMicBtn{color:#172746}
#ogCsMicBtn.muted{color:#d94b58}
#ogCsMicBtn .og-mic-slash{display:none}
#ogCsMicBtn.muted .og-mic-slash{display:block}
#ogCsAudioBtn{color:#172746}
#ogCsAudioBtn.muted{color:#d94b58}
#ogCsAudioBtn .og-audio-slash{display:none}
#ogCsAudioBtn.muted .og-audio-slash{display:block}
body.og-showcase-on .og-call-btn{visibility:hidden;pointer-events:none}
/* Call bump (owner's law 2026-11-15): while a call is live —
   body.og-showcase-on is set by og_talking.js enter() for the
   call's whole life and removed by exit() — OG's figure stands
   a little bigger than his normal showcase size: +12% (the
   164px phone reference becomes 184px), the same bump the Duo
   page's call card gets in og_duo.css, so he reads the same
   on every call surface. Off a call the showcase keeps the
   reference size in the rules above. */
body.og-showcase-on #ogShowcase{width:min(202px,49vw);height:min(280px,40vh);min-height:235px}
@media(max-width:540px){
 #ogShowcase{right:10px;bottom:calc(126px + env(safe-area-inset-bottom));width:min(164px,46vw);height:min(232px,34vh);min-height:204px}
 body.og-showcase-on #ogShowcase{width:min(184px,52vw);height:min(260px,38vh);min-height:228px}
 .og-call-pill{bottom:7px;padding:3px;gap:1px}
 .og-call-pill button{width:35px;height:35px}
}
/* Muse-inspired text chat layout. Keep the existing thread and controls,
   with a centered reading column, calm message bubbles, and a docked composer. */
body{
  background:
    radial-gradient(ellipse 75% 48% at 50% -12%,rgba(46,91,151,.28),transparent 72%),
    linear-gradient(180deg,#0c1930 0%,#091426 58%,#081224 100%);
  color:#edf4ff
}
.chat-wrapper{
  width:100%;max-width:880px;margin:0 auto;padding:0 12px
}
.chat-wrapper .chat-container{
  width:100%;max-width:880px;min-height:0;overflow:hidden;
  /* TEXT-BOARD ROUND (2026-11-05, second recording): the
     board is now a REAL bounded column. Before this, no rule
     in the whole cascade gave the container a height or a
     flex column — #messagesArea's flex:1 pointed at a block
     parent, its height was content-driven, and the "board"
     was only the padding reserves on an unbounded box. That
     is the mechanism behind all three frames of the owner's
     second drill: the ~630px hero start list overflowed the
     ~570px visible strip and slid under the fixed dock (rows
     stacked over the composer), and while a reply streamed
     the area grew/collapsed with the content, reflowing
     bubbles under the fixed top cluster (the doubled/stacked
     look). Now: the container is exactly the viewport tall,
     the message area is the one scroller (flex:1, min-height
     0), and the hero is capped to its slice with its own
     scroll — it can never reach the dock. The fixed top bar,
     showcase, Duo page and browser page are out of flow and
     unaffected; Duo mode's child-hiding rule still applies. */
  height:100dvh;display:flex;flex-direction:column;
  border:0;border-radius:0;background:transparent;box-shadow:none;
  /* TEXT-BOARD ROUND (2026-11-05): the reserves ride the
     SHIPPED chrome, not the pre-small-avatar cluster the
     238/198 pair was measured against — top cluster
     ~156px + 22 headroom, bottom dock ~172px + 12
     headroom. Board at 430x932: 496px -> 570px. The full
     budget is written out in og_shell.css beside the
     mirrored rule; keep the pair in step. */
  padding-top:calc(178px + env(safe-area-inset-top));
  padding-bottom:calc(184px + env(safe-area-inset-bottom))
}
#ogTopAvatarBar{
  background:linear-gradient(180deg,rgba(10,24,46,.97),rgba(10,24,46,.82) 68%,rgba(10,24,46,0));
}
#ogTopAvatarBar .og-top-ava{
  border-color:rgba(141,184,255,.62);
  box-shadow:0 0 18px rgba(69,145,255,.18)
}
#ogTopAvatarBar .og-top-name{color:#f3f7ff}
#ogTopAvatarBar .og-task-pill{color:#b8cdec}
.og-topbar .og-circle-btn{
  background:rgba(18,36,64,.92);border-color:rgba(141,184,255,.32);
  color:#dce9fb;box-shadow:0 6px 18px rgba(0,7,24,.3)
}
.og-topbar .og-circle-btn:hover{border-color:#8db8ff;color:#fff}
.og-topbar .og-call-btn{
  background:linear-gradient(145deg,#9ac4ff,#5f93d7);color:#0b1b33;
  box-shadow:0 6px 18px rgba(0,7,24,.32)
}
.og-topbar .og-call-btn:hover{box-shadow:0 0 0 3px rgba(141,184,255,.2),0 6px 18px rgba(0,7,24,.32)}
#messagesArea{
  flex:1 1 auto;width:100%;max-width:840px;min-width:0;min-height:0;
  height:auto;max-height:none;margin:0 auto;padding:16px clamp(12px,3vw,26px) 28px;
  overflow-y:auto;overscroll-behavior:contain;background:transparent;
  scrollbar-color:#385b8b transparent
}
/* The hero start screen shares the bounded column (above):
   capped to the slice the reserves leave it, scrolling
   internally when its list runs long — the start rows can
   no longer slide under the fixed composer dock. */
#emptyState{
  flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain
}
#messagesArea .message{
  display:flex;width:100%;max-width:min(100%,760px);gap:0;
  margin:0 auto 16px;align-items:flex-end;animation-duration:.24s
}
#messagesArea .message-avatar{display:none}
#messagesArea .message.ai{justify-content:flex-start}
#messagesArea .message.user{justify-content:flex-end;flex-direction:row}
#messagesArea .message .message-content{
  flex:0 1 auto;min-width:0;max-width:88%;padding:12px 16px;
  border:1px solid rgba(141,184,255,.2);border-radius:18px 18px 18px 5px;
  background:#172b49;color:#edf4ff;box-shadow:0 7px 20px rgba(0,7,24,.2);
  font:15px/1.65 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  overflow-wrap:anywhere
}
#messagesArea .message.ai .message-content{
  margin-right:auto;background:linear-gradient(150deg,#192f50,#142743);
  border-color:rgba(141,184,255,.2)
}
#messagesArea .message.user .message-content{
  margin-left:auto;max-width:82%;border-radius:18px 5px 18px 18px;
  background:linear-gradient(145deg,#285489,#1c416f);
  border-color:rgba(141,184,255,.34);color:#f5f8ff
}
#messagesArea .message-text{margin:0;line-height:1.65;color:inherit}
/* TEXT-BOARD ROUND (2026-11-05): a reply shows IN FULL.
   No height cap and no overflow clip may ever land on a
   message body — the bubble grows with its content and
   the board (not the bubble) is what scrolls. Stated as
   explicit nones at board specificity so a future sheet
   cannot quietly re-cap a long reply (the drill's cut-off
   bubble) without overriding this rule on purpose. */
#messagesArea .message .message-content{height:auto;max-height:none}
#messagesArea .message .message-text{height:auto;max-height:none;overflow:visible}
#messagesArea .message-time{margin-top:5px;color:#aec2df;font-size:.72rem}
#messagesArea .code-block,
#messagesArea pre{max-width:100%;overflow:auto}
#ogShellDock{
  width:min(880px,100%);padding:0 12px calc(10px + env(safe-area-inset-bottom))
}
#ogShellDock .input-area{background:transparent;border:0;padding:0}
#ogShellDock .input-wrapper{
  display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:6px;
  padding:6px 8px;border:1px solid rgba(141,184,255,.34);border-radius:999px;
  background:linear-gradient(135deg,rgba(20,40,70,.98),rgba(13,29,53,.98));
  box-shadow:0 14px 34px rgba(0,7,24,.42)
}
#ogShellDock .input-wrapper:focus-within{
  border-color:rgba(141,184,255,.82);box-shadow:0 0 0 3px rgba(95,171,255,.12),0 14px 34px rgba(0,7,24,.42)
}
#ogShellDock #plusBtn{
  color:#bbd4fa;border-radius:50%;background:transparent
}
#ogShellDock #plusBtn:hover{color:#fff;background:rgba(141,184,255,.12)}
#ogShellDock #messageInput{
  flex:1 1 auto;min-width:0;min-height:44px;padding:9px 10px;
  border:0;border-radius:20px;background:transparent;color:#f2f6ff;
  font:15px/1.5 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  box-shadow:none
}
#ogShellDock #messageInput:focus{border:0;outline:none;box-shadow:none}
#ogShellDock #messageInput::placeholder{color:#9db3d2;opacity:1}
#ogShellDock #voiceBtn{
  flex:0 0 42px;width:42px;height:42px;min-height:42px;padding:0;
  border:1px solid rgba(141,184,255,.4);border-radius:50%;
  background:#1b3a66;color:#eaf3ff;box-shadow:none
}
#ogShellDock #voiceBtn:hover{transform:none;border-color:#9ac4ff;background:#244b7f;color:#fff;box-shadow:none}
#ogShellDock #voiceBtn.recording,
#ogShellDock #voiceBtn.speaking{border-color:#a9ceff;background:#315d93;color:#fff}
#ogShellDock #sendBtn{
  flex:0 0 42px;width:42px;height:42px;min-height:42px;padding:0;
  border:0;border-radius:50%;background:#9ac4ff;color:#10213a;box-shadow:none
}
#ogShellDock #sendBtn:hover{transform:none;background:#b4d3ff;box-shadow:0 0 0 3px rgba(141,184,255,.15)}
#ogShellDock .og-status-line,
#ogShellDock .og-token-line{color:#9fb4d2;text-shadow:none}
#ogShellDock #ogSeatBar{
  /* Opaque (2026-11-04 scroll-ghosting hardening): this
     rule outranks og_shell.css's #ogSeatBar, so its .96
     alpha was the bar's real paint — the same navy, now
     solid, floating over the scrolling thread. */
  border-color:rgba(141,184,255,.26);background:#0d1c33;
  box-shadow:0 12px 30px rgba(0,7,24,.42)
}
#ogShellDock .og-seat{color:#b6c8e1}
#ogShellDock .og-seat.active,
#ogShellDock .og-seat.on{color:#eaf3ff;background:rgba(91,147,215,.22)}
#ogShellDock .og-seat.active .og-seat-name,
#ogShellDock .og-seat.on .og-seat-name{color:#d9e9ff}
@media(max-width:768px){
  .chat-wrapper{padding:0}
  .chat-wrapper .chat-container{border-radius:0}
  #messagesArea{padding:14px 14px 24px}
  #messagesArea .message .message-content{max-width:90%}
  #messagesArea .message.user .message-content{max-width:86%}
  #ogShellDock{padding:0 10px calc(8px + env(safe-area-inset-bottom))}
  #ogShellDock .input-wrapper{gap:4px;padding:5px 7px}
  #ogShellDock #messageInput{font-size:16px}
}
@media(max-width:480px){
  #messagesArea{padding-left:12px;padding-right:12px}
  #messagesArea .message .message-content{padding:11px 13px;font-size:14px}
  #ogShellDock #voiceBtn,#ogShellDock #sendBtn{flex-basis:40px;width:40px;height:40px;min-height:40px}
}

/* Move the floating portrait without scrolling the page or stealing controls. */
#ogShowcase .og-callstage{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
#ogShowcase .og-callstage:active{cursor:grabbing}
#ogShowcase img,#ogShowcase video{-webkit-user-drag:none}
#ogShowcase .og-call-pill{touch-action:manipulation;cursor:auto}
body.og-showcase-on #voiceBtn{display:none!important}
