.cockpit-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.cockpit-head > .icon-btn { margin-left: -6px; }
.cockpit-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cockpit-title h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.cockpit-head .sub { margin-top: 2px; }

.cockpit-browser { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px var(--gutter) 24px; }
.cockpit-line { gap: 12px; min-height: 34px; }
.cockpit-line .strong { font-weight: 600; }
.cockpit-stage { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.browser-frame { width: min(100%, calc((100vh - 250px) * 1.6)); aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid var(--line-hard); }
.browser-frame.live { background: var(--player); }
.browser-frame.live iframe { width: 100%; height: 100%; border: 0; display: block; }
.visit-note { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; color: var(--player-ink); font-size: 14px; text-align: center; }
.visit-note .ico.spin { color: var(--player-ink); }
.browser-frame.elsewhere { background: var(--surface); color: var(--ink-soft); font-size: 15px; padding: 32px; text-align: center; flex-direction: column; gap: 16px; }

.rail.cockpit-chat { width: 420px; }
.cockpit-feed { flex: 1; min-height: 0; padding: 20px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-hard) transparent; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.msg-me { align-self: flex-end; max-width: 80%; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; font-size: 15px; }
.act { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink); }
.act.now { font-weight: 600; }
.feed-h { margin-top: 10px; }
.act .tcell.mini { margin-top: 2px; }
.approve-card { border: 1px solid var(--line-hard); border-radius: var(--r); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 0 0 3px var(--amber-wash); }
.approve-card .card-q { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.approve-card .card-facts .fact:first-child { border-top: 1px solid var(--line); }
/* An ended run: its outcome is the main area's one subject, centred where the browser was. */
.cockpit-result { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; max-width: 640px; margin: 0 auto; padding-bottom: 80px; }
.cockpit-result .answer { font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -.01em; }
.cockpit-result .tcell.big { width: 44px; height: 44px; }
.cockpit-result .tcell.big svg { width: 44px; height: 44px; }
.composer { flex: none; border-top: 1px solid var(--line); padding: 12px 16px 16px; display: flex; gap: 10px; align-items: flex-end; }
.composer .textarea { flex: 1; min-height: 44px; max-height: 200px; overflow-y: auto; resize: none; }
.composer .btn { height: 44px; }

.log-lines { display: flex; flex-direction: column; }
.logline { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.logline .lt { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.logline.hl { background: var(--amber-wash); font-weight: 600; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; border-bottom-color: transparent; }

/* The run view an agent's app draws in its chat (pages/run_view.html): one narrow column that
   grows with its content, since the app sizes the frame to what the view reports. */
.run-view .view { display: flex; flex-direction: column; gap: 16px; padding: 16px var(--gutter) 20px; max-width: var(--column-w); }
.run-view .view-head { display: flex; flex-direction: column; gap: 2px; }
.run-view .view-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.run-view .cockpit-result { padding-bottom: 0; }
.run-view .view-paused { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line-hard); border-radius: var(--r); background: var(--surface); padding: 14px 16px; box-shadow: 0 0 0 3px var(--amber-wash); }
.run-view .view-paused p { flex: 1; min-width: 200px; }
.run-view .view-confirm { display: flex; flex-direction: column; gap: 10px; }
/* An app's frame can be phone-narrow: a long choice wraps inside its button instead of running out. */
.run-view .approve-card .btn { white-space: normal; height: auto; min-height: 38px; padding-top: 8px; padding-bottom: 8px; max-width: 100%; text-align: left; }
