/* Compact task mode. Original palette/character; one question and one scroll surface.
   No portal DOM, speech transport or task state is changed by this stylesheet. */
.compact-work-header, .compact-browser-label, .compact-browser-expand, .compact-conversation, .compact-centre { display: none; }
body.compact-work { overflow: hidden; }
body.compact-work::after { display: none; }
body.compact-work .shop-hero, body.compact-work #focusExitButton { visibility: hidden; }
body.compact-work .agent-computer {
  --compact-dock-height: 88px;
  position: fixed !important; inset: 0 !important; width: 100% !important; height: 100dvh !important;
  display: flex !important; flex-direction: column; gap: 12px;
  padding: 0 max(16px, calc((100vw - 720px) / 2)) calc(var(--compact-dock-height) + 24px) !important;
  overflow: auto !important; overscroll-behavior: contain; scroll-padding: 16px;
  background: var(--paper-light) !important; color: var(--ink); pointer-events: auto !important;
  font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", "Avenir Next", sans-serif;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important;
}
/* Overflow scrolls; it must never compress text/header boxes into overlapping lines. */
body.compact-work .agent-computer > *,
body.compact-work .handoff-card > *,
body.compact-work .handoff-input-form > *,
body.compact-work .handoff-input-fields > *,
body.compact-work .intake-chat > *,
body.compact-work .intake-chat-compose > * { flex-shrink: 0; }
body.compact-work .compact-work-header {
  min-height: 0;
  position: static; top: auto; z-index: auto; backdrop-filter: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; order: 0;
  padding: max(8px, env(safe-area-inset-top)) 0 8px; border-bottom: 1px solid var(--line);
  color: var(--indigo-deep); background: var(--paper-light);
}
body.compact-work .compact-work-header button, body.compact-work .compact-browser-expand {
  min-height: 44px; padding: 6px 8px; border: 0; background: transparent; color: var(--indigo-deep);
  font-size: 14px; line-height: 1.4; cursor: pointer; border-radius: 8px;
}
body.compact-work .compact-work-header button:hover, body.compact-work .compact-browser-expand:hover { background: var(--paper-deep); }
.compact-identity { display: flex; align-items: center; gap: 8px; }
.compact-identity strong { display: block; font-size: 20px; }
.compact-identity small { display: block; font-size: 12px; }
#compactFace { width: 48px; height: 52px; overflow: hidden; flex: none; border-radius: 12px; background: var(--paper-deep); }
body.compact-work #compactFace #faceCanvas { display: block; width: 68px; height: 85px; max-height: none; transform: translate(-10px, -5px); filter: none; }
/* Flatten layout wrappers without moving/reloading the live iframe or copying controls. */
body.compact-work .handoff-layer:not([hidden]),
body.compact-work .handoff-card,
body.compact-work .handoff-input-form:not([hidden]),
body.compact-work .handoff-input-fields,
body.compact-work .intake-chat.has-response-controls,
body.compact-work .intake-chat-compose.is-adaptive { display: contents !important; }
body.compact-work .handoff-layer { pointer-events: auto; }
body.compact-work .handoff-layer, body.compact-work .handoff-card { transform: none !important; animation: none !important; filter: none !important; backdrop-filter: none !important; }
body.compact-work .handoff-card::before { display: none; }
body.compact-work #handoffSpeechHost, body.compact-work #workSpeechHost, body.compact-work .takeover-panel { display: none; }
body.compact-work .intake-chat-head { order: 1; min-height: 0; padding: 0 !important; border: 0; position: static; top: auto; z-index: auto; backdrop-filter: none; background: transparent; }
body.compact-work .intake-chat-head strong { display: none; }
body.compact-work .intake-chat-progress { color: var(--leaf); background: transparent; padding: 0; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: normal; white-space: normal; }
body.compact-work .response-question { order: 2; margin: 0; font-size: 22px; font-weight: 700; line-height: 1.5; scroll-margin-top: 12px; }
body.compact-work .step-paper {
  order: 3; position: relative !important; z-index: 0 !important; inset: auto !important; flex: none !important;
  width: 100% !important; height: 200px !important; min-height: 0 !important; margin: 0 !important;
  border: 1px solid var(--line) !important; border-radius: 10px !important; transform: none !important;
  box-shadow: none !important; background: white; overflow: hidden; pointer-events: auto;
}
body.compact-work .step-paper::before,
body.compact-work .browser-dots, body.compact-work .browser-address, body.compact-work .browser-mock { display: none !important; }
body.compact-work .live-browser-bar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; height: auto; padding: 0 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
body.compact-work .compact-browser-label { display: block; font-size: 14px; font-weight: 600; color: var(--indigo-deep); }
body.compact-work .compact-browser-expand { display: block; font-weight: 700; }
body.compact-work .live-site-sheet { height: calc(100% - 44px) !important; min-height: 0 !important; padding: 0; overflow: auto; }
body.compact-work .live-browser-frame { width: 100%; height: 100% !important; min-height: 0 !important; }
body.compact-work.compact-browser-expanded .step-paper { height: max(320px, calc(100dvh - var(--compact-dock-height) - 32px)) !important; }
/* A view-only portal remains view-only. Expansion is not a takeover or a new session. */
body.compact-work .response-choices { order: 5; display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
body.compact-work .response-choices[hidden] { display: none; }
body.compact-work .response-option-row { gap: 8px; }
body.compact-work .response-choices button { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; line-height: 1.5; font-weight: 600; box-shadow: none; }
body.compact-work .response-option-help { flex-basis: 72px; font-size: 14px !important; color: var(--indigo); background: transparent; white-space: nowrap; padding: 8px !important; }
body.compact-work .response-option-select small { display: none; }
body.compact-work .response-option-explanation { font-size: 16px; margin: 0; line-height: 1.5; }
body.compact-work .intake-adaptive-date { order: 5; margin: 0; }
body.compact-work .response-typing { order: 6; margin: 0; }
body.compact-work .response-typing:not([open]) { display: none; }
body.compact-work .response-typing summary, body.compact-work .response-typing textarea { font-size: 16px; }
body.compact-work .intake-adaptive-status { order: 7; color: var(--ink-soft); text-shadow: none; font-size: 14px; line-height: 1.5; padding: 0; }
body.compact-work .live-field-status { order: 4; font-size: 14px; line-height: 1.5; margin: 0; padding: 6px 8px; }
body.compact-work .live-field-status:empty, body.compact-work .handoff-input-error:empty { display: none; }
body.compact-work .response-secondary { order: 7; font-size: 16px; margin: 0; min-height: 44px; }
body.compact-work .intake-adaptive-manual { order: 8; color: var(--indigo) !important; min-height: 44px; margin: 0; font-size: 14px; }
body.compact-work .intake-ledger:not([hidden]) { order: 9; max-height: none !important; overflow: visible !important; box-shadow: none; }
body.compact-work .handoff-input-submit, body.compact-work .handoff-input-error { order: 10; }
body.compact-work .compact-answer-dock {
  position: fixed; z-index: 2; left: max(0px, calc((100vw - 752px) / 2)); bottom: 0;
  width: min(752px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: var(--paper-light);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(36,32,42,.04);
}
body.compact-work .compact-answer-dock .intake-adaptive-primary {
  min-height: 52px; padding: 8px 10px; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 10px; background: var(--vermillion); color: white; box-shadow: none; transform: none;
}
body.compact-work .intake-adaptive-icon { width: 24px; height: 28px; flex: 0 0 24px; background: transparent; box-shadow: none; color: white; }
body.compact-work .intake-adaptive-icon svg { width: 24px; height: 24px; }
body.compact-work .intake-adaptive-copy strong { font-size: 16px; line-height: 1.5; }
body.compact-work .intake-adaptive-copy small, body.compact-work .intake-adaptive-arrow { display: none; }
body.compact-work .compact-answer-dock > .response-secondary, body.compact-work .compact-write {
  padding: 8px; min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: transparent;
  color: var(--indigo-deep); font: inherit; font-size: 14px; cursor: pointer; margin: 0;
}
body.compact-work [hidden] { display: none !important; }
@media (max-width: 420px) {
  body.compact-work .compact-identity small { display: none; }
  body.compact-work .compact-work-header button { max-width: 92px; }
  body.compact-work #compactFace { width: 38px; height: 44px; }
}
@media (min-width: 900px) {
  body.compact-work .step-paper { height: 300px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.compact-work * { scroll-behavior: auto !important; animation: none !important; }
}

/* Colourful Kendra: one original animated scene, not another conversation layer. */
body.colourful-work .agent-computer {
  background: linear-gradient(90deg, rgba(221,161,45,.09), transparent 25%, transparent 75%, rgba(221,161,45,.09)), var(--paper-light) !important;
}
body.colourful-work .compact-work-header {
  padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  background: var(--indigo); color: var(--haldi-soft); border-bottom: 4px solid var(--haldi);
  box-shadow: 0 3px 0 var(--indigo-deep); border-radius: 0 0 12px 12px;
}
body.colourful-work .compact-work-header button { color: var(--paper-light); }
body.colourful-work .compact-work-header button:hover { background: var(--indigo-deep); }
body.colourful-work .compact-identity small { color: var(--paper-light); }
body.colourful-work #compactFace { display: none; }
body.colourful-work .compact-centre { display: inline; }
body.colourful-work .compact-conversation { display: contents; }
body.colourful-work .compact-scene {
  display: grid; grid-template-columns: clamp(100px, 34%, 124px) minmax(0, 1fr); align-items: center; flex-shrink: 0;
  order: 1; gap: 10px; padding: 8px 10px 8px 0; min-height: 156px;
  border: 1px solid var(--haldi); border-bottom: 5px solid var(--haldi); border-radius: 12px;
  background: var(--haldi-soft); position: relative;
}
body.colourful-work #colourfulFace { align-self: end; width: 100%; overflow: hidden; border-radius: 0 0 0 9px; }
body.colourful-work #colourfulFace #faceCanvas {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: none; transform: none; filter: none;
}
body.colourful-work #compactPrompt {
  min-width: 0; padding: 12px; border-radius: 12px 12px 12px 3px; background: var(--paper-light);
  box-shadow: 2px 3px 0 rgba(47,68,125,.12);
}
body.colourful-work .response-question { font-size: 19px; line-height: 1.5; }
body.colourful-work .intake-chat-head { display: block; margin: 0 0 8px; }
body.colourful-work .intake-chat-progress { font-size: 12px; line-height: 1.5; }
body.colourful-work .step-paper { border-color: var(--indigo) !important; border-top-width: 3px !important; }
body.colourful-work .live-browser-bar { background: var(--indigo); border: 0; }
body.colourful-work .compact-browser-label, body.colourful-work .compact-browser-expand { color: var(--paper-light); }
body.colourful-work .compact-browser-expand:hover { background: var(--indigo-deep); }
body.colourful-work .response-option-select { border-color: rgba(47,68,125,.35); border-left: 4px solid var(--haldi); background: var(--paper-light); }
body.colourful-work .response-option-select:hover { background: var(--haldi-soft); }
body.colourful-work .response-option-help { background: var(--paper-deep); border-color: transparent; }
body.colourful-work .compact-answer-dock { border-top: 4px solid var(--haldi); background: var(--indigo-deep); box-shadow: 0 -3px 0 rgba(47,68,125,.15); }
body.colourful-work .compact-answer-dock > .response-secondary, body.colourful-work .compact-write { color: var(--paper-light); }
body.colourful-work .compact-answer-dock .intake-adaptive-primary { border: 1px solid var(--haldi-soft); }
@media (min-width: 1000px) {
  body.colourful-work .agent-computer {
    display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: max-content max-content; align-content: start; align-items: start; gap: 24px;
    padding: 0 max(24px, calc((100vw - 1200px) / 2)) calc(var(--compact-dock-height) + 24px) !important;
  }
  body.colourful-work .compact-work-header { grid-column: 1 / -1; }
  body.colourful-work .compact-conversation { display: flex; flex-direction: column; gap: 12px; grid-column: 1; grid-row: 2; min-width: 0; }
  body.colourful-work .compact-scene { grid-template-columns: minmax(140px, 40%) minmax(0, 1fr); }
  body.colourful-work .response-question { font-size: 22px; }
  body.colourful-work .intake-chat-progress { font-size: 14px; }
  body.colourful-work .step-paper { grid-column: 2; grid-row: 2; height: max(420px, calc(100dvh - var(--compact-dock-height) - 128px)) !important; position: sticky !important; top: 16px !important; }
  body.colourful-work.compact-browser-expanded .step-paper { height: max(420px, calc(100dvh - var(--compact-dock-height) - 32px)) !important; }
  body.colourful-work .compact-answer-dock { width: min(1248px, 100%); left: max(0px, calc((100vw - 1248px) / 2)); padding-left: 24px; padding-right: 24px; grid-template-columns: minmax(0, 1fr) auto auto; }
}
