/* Round 321 — Ticket N (the look) + Ticket A5 surface, CANDIDATE.
   Brent (2026-10-20): "get everything that we design in there
   before we fix everything" — the design wave lands before the
   fix wave. The reference is the video Brent recorded of a
   modern chat app: tight text-message bubbles, the browser as
   a CARD inside the thread, a presence capsule at the top, a
   clean icon+label bottom bar, and pages whose entries are
   cards under big clean headers. OG KEEPS BRENT'S COLORS —
   black + gold — everything else matches the reference.
   This sheet is linked LAST so its rules win the cascade for
   the surfaces it restyles; the machinery sheets stay as they
   are. Standing laws honored here: ONE OG on screen at a time
   (hero vs presence capsule vs menu — see section 2), NO
   PILE-UP (pages are pages; the seat screens already switch),
   FIT-PERFECT (nothing here widens or crops the phone view). */

/* --- 1. Chat goes tight ---------------------------------------------
   Compact text-message bubbles: no per-message avatar (Ticket
   N + the standing TEXT ONLY rule — OG's face lives in the
   presence capsule, not beside every message), small padding,
   snug line-height, gold for the visitor, quiet dark for OG. */
.messages-area { padding: 16px 12px 20px; }
.message { gap: 0; margin-bottom: 8px; animation: ogMsgIn .22s ease-out; }
@keyframes ogMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.message-avatar { display: none !important; }
.message-content {
    max-width: 84%;
    padding: 9px 13px 7px;
    border-radius: 18px;
    font-size: .95rem;
    box-shadow: none;
}
.message.user .message-content {
    /* Ticket H2 round 4 (cand-h7, Brent: "make the gold
       have solid bubbles in text"): SOLID — the old 17%
       gold tint let the rain show through the bubble.
       This hex is that exact tint composited over the
       page's near-black (#0a0a0a), frozen opaque: same
       gold the eye already knows, alpha 1.0, no rain
       through it ever. The OG bubble opposite (#1b1b1b)
       was already solid. */
    background: #342909;
    border: 1px solid rgba(255,193,7,.5);
    border-bottom-right-radius: 6px;
}
.message.ai .message-content {
    background: #1b1b1b;
    border: 1px solid #2b2b2b;
    border-bottom-left-radius: 6px;
}
.message-text { line-height: 1.45; margin-bottom: 2px; overflow-wrap: anywhere; }
.message-time { font-size: .68rem; opacity: .55; }

/* --- 2. Presence capsule + ONE OG ------------------------------------
   The capsule: a smaller avatar over a dark pill carrying the
   name and the live status — the reference shape, OG's colors.
   ONE OG: while the hero (empty state) owns the screen the
   capsule is gone entirely — the hero IS OG's presence there.
   The JS half (the page's syncEmpty) toggles body.og-hero-on;
   the :has rule is the same law stated in pure CSS so it holds
   even before the first sync runs. The slide-over menu is a
   page of its own with its own small head — while it is open
   the capsule steps aside too. The profile sheet (z 8001) and
   the browser window (z 9000) already cover the capsule
   (z 7500) outright, so exactly one OG face shows there too. */
.og-top-avatar-bar { padding-top: calc(8px + env(safe-area-inset-top)); pointer-events: none; }
.og-top-avatar {
    width: 62px; height: 62px;
    border: 2px solid rgba(255,193,7,.75);
    box-shadow: 0 4px 18px rgba(0,0,0,.55);
    pointer-events: auto;
}
.og-avatar-name-bubble {
    margin-top: 5px; padding: 6px 16px 7px;
    border-radius: 999px; background: rgba(14,14,14,.92);
    border: 1px solid rgba(255,193,7,.4);
    box-shadow: 0 6px 18px rgba(0,0,0,.5);
    pointer-events: auto;
}
.og-avatar-name { font-size: .98rem; font-weight: 800; color: #fff; letter-spacing: .2px; }
.og-task-pill-top { font-size: .74rem; margin-top: 1px; }
body.og-hero-on #ogTopAvatarBar { display: none !important; }
body:has(#emptyState:not([hidden])) #ogTopAvatarBar { display: none !important; }
body:has(.og-menu.open) #ogTopAvatarBar { display: none !important; }

/* --- 3. The browser CARD inside the chat ------------------------------
   The panel's docked face is a card in the thread now (the
   page script moves it into the messages area while a session
   runs): a header row — globe chip, "Browser", and the live
   status line — over the preview, with Open browser as one
   wide, obviously-tappable button. In the full window the
   card header steps aside (the window has its own header). */
#browserPanel {
    width: 100%; max-width: none; margin: 0 0 12px;
    border-radius: 20px; border: 1px solid rgba(255,193,7,.42);
    background: #101010; overflow: hidden;
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
}
.og-card-head {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 52px 10px 14px;
}
.og-card-head-ico {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.05rem;
    background: rgba(255,193,7,.16); border: 1px solid rgba(255,193,7,.45);
}
.og-card-head-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.og-card-head-title { font-weight: 800; font-size: .98rem; color: #f5f5f5; line-height: 1.2; }
.og-card-head-status {
    font-size: .8rem; color: #d8b34a; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#browserPanel.og-r43-full .og-card-head { display: none; }
#browserPanel.og-panel-full .og-card-head { display: none; }
#browserPanel .og-browser-open {
    width: calc(100% - 24px); margin: 10px 12px 12px;
    padding: 13px; border-radius: 999px;
    font-size: .95rem; font-weight: 800;
}
#browserPanel .og-browser-actions { padding: 0 12px 12px; gap: 8px; }
#browserPanel .og-browser-actions button {
    border-radius: 999px; padding: 10px 14px; font-weight: 700;
}
/* Ticket N2 (ogtest24 fix): the card state must defeat
   og_shell.css's Round 70 "small bar" shaping, which keys
   on the panel carrying NEITHER page full class — exactly
   the card's class set — and would otherwise pin the card
   fixed mid-screen as a one-row bar with the preview
   hidden (the drill never saw a card in the thread).
   Scoped to the docked states (neither full class), so
   the window states are untouched; the shell's [hidden]
   rule still governs when there is no session. */
#browserPanel:not(.og-r43-full):not(.og-panel-full) {
    position: relative; left: auto; top: auto;
    transform: none; z-index: auto;
    display: block; align-items: stretch; gap: 0;
    padding: 0;
}
#browserPanel:not(.og-r43-full):not(.og-panel-full) .og-browser-view {
    display: block !important;
}
#browserPanel:not(.og-r43-full):not(.og-panel-full) .og-browser-x {
    position: absolute;
}

/* --- 4. Bottom bar ----------------------------------------------------
   The seat pill + composer dock: one rounded bar, icon over
   label, the active seat filled gold so it reads at a glance. */
#ogShellDock .og-seat-bar {
    border-radius: 26px; background: rgba(16,16,16,.94);
    border: 1px solid rgba(255,193,7,.32);
    box-shadow: 0 12px 30px rgba(0,0,0,.55);
    padding: 5px;
}
.og-seat { padding: 8px 2px 6px; border-radius: 21px; }
.og-seat svg { width: 23px; height: 23px; }
.og-seat-label { font-size: .62rem; }
.og-seat.is-on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), 0 2px 8px rgba(255,193,7,.25); }

/* --- 5. Pages: Feed / Ideas / Progress --------------------------------
   Same language as the thread: a big clean header, card-style
   entries (icon + bold title + one-line sub), generous
   spacing, pill tags. The seat screen's top edge follows the
   slimmer capsule. Progress keeps the Manager Dashboard as
   its ONLY content — untouched, just framed by the header. */
#ogSeatScreen { top: calc(136px + env(safe-area-inset-top)); background: #0a0a0a; }
.og-seat-screen-head { padding: 16px 18px 10px; }
.og-seat-screen-title { font-size: 1.45rem; font-weight: 800; letter-spacing: .2px; }
.og-seat-view { padding: 6px 18px 22px; }
.og-appr-sec { font-size: .8rem; color: #d8b34a; margin: 22px 2px 10px; }
.og-appr-item {
    border-radius: 18px; background: #161616; border: 1px solid #262626;
    padding: 15px 16px; margin: 0 0 12px; gap: 13px;
}
.og-appr-item-title { font-size: 1rem; }
.og-appr-item-body { font-size: .9rem; }
.og-feed-tabs { gap: 8px; padding: 8px 0 14px; }
.og-feed-tab { padding: 8px 15px; border-radius: 999px; }
@media (max-width: 768px) {
    #ogSeatScreen { top: calc(130px + env(safe-area-inset-top)); }
    .message-content { max-width: 87%; }
}

/* --- Ticket E3 + E4: hero medallion, hero status pill,
   the steady ring ------------------------------------------
   Brent (2026-10-21): the hero/showcase avatar shrinks to a
   medallion about the size of Maya's app avatar — roughly
   1/6 of the phone's width. It was 88 px (styles.css's base
   .og-avatar rule). The capsule and the profile sheet keep
   their sizes; chat avatars untouched.
   The hero also gains the status pill (#ogTaskPillHero in
   the empty state): while the hero owns the screen the
   capsule is hidden (section 2 — ONE OG), so the pill rides
   with the hero, painted by the page's ONE pill updater
   through the shell coordinator, naming what OG is doing
   from the same real signals as everywhere else.
   E4: the hero's gold ring moves onto the WRAPPER (the
   capsule/profile shape) — constant across still and clip,
   never hidden, never filter-pulsed. Measurement on
   Brent's drill recording convicted the "flashing
   circle": the border band's luminance never moved
   (27-32 across rest/thinking/stream) — what flashed was
   the artwork CUT inside the circle (face band 68 -> 25
   -> 59 across the state changes) plus, on the still,
   ogThink2's brightness pulse (1.14-1.22, 1.1 s) animating
   the bordered img. Both die here: the presenter keeps
   one face (Ticket E4), and the showcase state treatments
   below are transform-only and calm. */
/* Ticket E5 (Brent, 2026-10-21 17:06) took the circle
   OFF the hero ("give him half body like yours"): the
   wrap became a tall feathered figure (86 x 122, radial
   mask). AVATAR CIRCLE + BLINK (Brent, 2026-10-24 10:02)
   supersedes it — his words: "Make it look like he's in
   a circle not a square but you don't wanna see any
   edges and he need to be able to blink." The hero is a
   CIRCLE again, identical in construction to the top-bar
   medallion (square wrap, radius 50%, overflow hidden,
   the same steady 2 px gold ring + soft glow, the E4
   reframe inside): the square poster's corners can never
   show and there is no mask feather left to read as an
   edge. The half-body staging survives only where Brent
   ordered it — Ticket DUO's own page. */
#emptyState .og-ava-wrap {
    width: 86px; height: 86px; border-radius: 50%;
    overflow: hidden; box-sizing: border-box;
    border: 2px solid #ffc107;
    box-shadow: 0 0 14px rgba(255,193,7,.35);
    background: #111; line-height: 0;
}
#emptyState .og-ava-wrap img.og-avatar {
    width: 100%; height: 100%; display: block;
    border: 0; box-shadow: none; border-radius: 50%;
    object-fit: cover;
}
#emptyState .og-ava-wrap video { border-radius: 50%; }
/* Calm state treatments on the three showcase stills.
   thinking: NO keyframe motion (AVATAR MOTION step,
   2026-10-23) — the old slow tilt (ogThinkCalm) was the
   last fixed-period loop on a showcase face, and Brent's
   standard retires it: while OG composes, the face keeps
   og_idle's procedural life (breath, drift, weight
   shift) and the presence pill names the phase. talking:
   no keyframe flap at all — the audio-driven mouth
   (og_mouth.js) does the talking; the still stays calm.
   listening: the
   ogIdle2 blink-dip loop and the hard ring retire for a
   steady, softer ring (the hero's lives on its wrapper,
   above, via the body mood class — the (1,2,1) hero rule
   keeps the hero img itself ring-free). */
/* --- E4 reframe (owner reference 2026-10-21 15:44 — his Muse
   medallion): the circle holds a HEAD-AND-SHOULDERS portrait, not
   a tight face crop. The poster (measured: hair ~4% -> chin ~63%
   of frame) is scaled to .75 and lifted 5% inside its circle via
   the independent scale/translate properties, which COMPOSE with
   the transform every driver writes (og_idle breathing, the mood
   keyframes) instead of fighting them — the framing holds in
   every state, and the head lands at ~44% of the circle height.
   The clips in the same wrappers carry the same framing, so a
   state change never reframes the face. --- */
#ogTopAvatarBar .og-top-ava img.og-avatar, .og-profile-ava img.og-avatar,
#ogTopAvatarBar .og-top-ava video, .og-profile-ava video,
#emptyState .og-ava-wrap img.og-avatar,
#emptyState .og-ava-wrap video { scale: .75; translate: 0 -5%; }
/* Ticket E5 took the hero still/clips out of the rule
   above while the figure stood; the CIRCLE + BLINK step
   (2026-10-24) puts the hero back in — same circle, same
   reframe, so a state change never reframes any face and
   all three medallions present the identical portrait. */
/* The hero name/status bubble (the one pill under the medallion)
   shows its NAME face at rest and its STATUS face while busy; the
   updater flips data-state from the pill's truthful text. */
#emptyState .og-name-bubble[data-state="rest"] .og-task-pill { display: none; }
#emptyState .og-name-bubble[data-state="busy"] .og-hero-name { display: none; }

.og-ava-wrap img.og-avatar.thinking,
.og-top-ava img.og-avatar.thinking,
.og-profile-ava img.og-avatar.thinking {
    animation: none; /* og_idle carries the thinking face */
}
.og-ava-wrap img.og-avatar.talking,
.og-top-ava img.og-avatar.talking,
.og-profile-ava img.og-avatar.talking { animation: none; }
.og-ava-wrap img.og-avatar.listening,
.og-top-ava img.og-avatar.listening,
.og-profile-ava img.og-avatar.listening {
    animation: none;
    box-shadow: 0 0 0 2px rgba(255,193,7,.5),
                0 0 12px rgba(255,193,7,.28);
}
/* Ticket E5 dropped the hero's listening ring with the
   circle; the CIRCLE + BLINK step (2026-10-24) restores
   both together — the hero listens with the same steady
   ring as the top-bar and profile medallions. */

/* --- AVATAR MOTION step (2026-10-23): the menu avatar.
   The small face in the ☰ menu header (img.og-avatar-sm,
   the page's only one) sat OUTSIDE every protection
   above: styles.css ran it on canned keyframe loops —
   ogIdle2 (5.6 s, with the brightness blink-dips Ticket
   H3 banned) at rest, ogThink2 (1.1 s) while thinking,
   and a 0.38 s ogTalk2 bounce loop the whole time OG
   speaks (Fix B audit, ITEM #1). Brent's standard —
   natural and real, never a repeating loop — retires
   all three: the menu face is a calm still in every
   mood. (Ties with the styles.css rules are won by this
   sheet's later position; the win one-shot and the
   listening ring in styles.css are untouched — an
   earned one-shot beat is feedback, not a loop.) --- */
img.og-avatar-sm { animation: none; }
body.og-mood-thinking img.og-avatar-sm,
body.og-mood-talking img.og-avatar-sm { animation: none; }

/* --- Scroll-ghosting hardening (owner drill, 2026-11-04) ---
   The landing starter rows were transparent at night, so
   the animated rain field painted straight through them
   and the rows smeared against it on scroll (the day face
   already carries them solid in og_theme.css, and Ticket
   H2's rule for bubbles — solid, never see-through — is
   the house standard this extends). They take the menu
   cards' #171717. The menu scroller also stops chaining
   its scroll to the page beneath (Ticket L2 named the
   chain as half the smear); the Settings scroller carries
   the same rule in og_settings.css. */
.og-row { background: #171717; }
.og-menu-body { overscroll-behavior: contain; }

/* The top cluster's name bubble is a tap target too
   (2026-11-04 follow-up): the bar rides pointer-events:
   none (og_look.css §2 / og_shell.css) with only the
   medallion re-enabled, so taps on OG's name and the
   "Online & Ready" pill fell THROUGH the bar onto the
   chat column and died — half the "tap the avatar at the
   top" surface was inert. The bubble re-enables here;
   og_topcard.js's window-capture claim routes the tap to
   the card. The bar's empty areas stay click-transparent
   exactly as before. */
.og-top-avatar-bar .og-name-bubble { pointer-events: auto; }
