/* Task three keeps the shared frame. Slides are standalone 16:9 images. */
.t3-screen.t1-source { max-width: 1200px; padding: 24px; }
.t3-screen .t1-heading h1 { font-size: clamp(24px, 2vw, 29px); }
.t3-screen .t1-heading > p { max-width: 950px; font-size: 14px; }
.t3-materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.t3-material { min-width: 0; padding: 16px; background: #f5f5f8; border: 1px solid #e4e4ee; border-radius: 16px; }
.t3-material:nth-child(2) { background: #eff5fc; border-color: #dce6f3; }
.t3-material > header { display: flex; align-items: center; gap: 12px; }
.t3-material h2 { margin: 3px 0 0; font-size: 20px; font-weight: 600; }
.t3-material small { color: #696b81; font-size: 11px; }
.t3-material-check { margin-left: auto; color: #358341; background: #e4f8d5; border-radius: 20px; padding: 7px 10px; font-size: 10px; white-space: nowrap; }
.t3-source-note { color: #60667d; font-size: 12px; line-height: 1.6; }
.t3-material .artifact-preview { width: 100%; margin: 14px 0 0; --artifact-preview-height: 180; }
.t3-material .artifact-canvas .t1-plan-notes, .t3-material .artifact-canvas .t2-findings { display: none; }
.t3-source-note { text-align: center; margin: 18px 0; }
.t3-screen.t1-source .t1-actions { background: #eeebff; border: 1px solid #dcd5ff; box-shadow: 0 4px 18px #2523490d; }
.t3-screen.t1-source .t1-actions strong { font-size: 16px; }
.t3-screen.t1-source .t1-actions p { font-size: 12px; }
.t3-file-symbol { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; background: #fff; border-radius: 10px; font-size: 22px; color: #6648d9; }
.t3-screen .t1-input-row textarea { height: 105px; }
.t3-screen .t1-workspace-inner { width: min(1100px, 100%); padding: 16px 22px; }
.t3-screen .t1-chat { height: clamp(490px, calc(100dvh - 240px), 900px); }
.t3-screen .t1-feed { background: #f8faff; overscroll-behavior-y: auto; padding: 22px; }
.t3-screen .t1-message--user { max-width: 78%; }
.t3-screen .t1-message--ai { gap: 10px; margin-bottom: 24px; }
.t3-screen .t1-message--ai > .t1-ai-icon { width: 30px; height: 30px; font-size: 12px; }
.t3-screen .t1-message--ai > .t1-bubble { min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.t3-slide-message .t1-bubble { width: min(100%, 640px); }
.t3-screen .t1-bubble p { font-size: 13px; line-height: 1.6; }
.t3-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 12px 0; }
.t3-thumbnail { display: block; padding: 0; min-width: 0; border: 1px solid #dedfeb; border-radius: 12px; overflow: hidden; background: #fff; color: #30364b; text-align: left; cursor: zoom-in; transition: border-color .15s; }
.t3-thumbnail:hover { border-color: #6543ef; }
.t3-thumbnail img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.t3-thumbnail > span { display: flex; align-items: center; gap: 7px; padding: 9px 10px; font-size: 10px; line-height: 1.4; }
.t3-thumbnail b { color: #777a90; font-weight: 500; }
.t3-thumbnail i { margin-left: auto; font-style: normal; font-size: 16px; color: #6551ac; }
.t3-preview-hint { color: #797e92; font-size: 10px !important; margin: 6px 0 20px !important; }
.t3-question { max-width: 570px; }
.t3-reply-box { border: 1px solid #d8d9e8; border-radius: 15px; padding: 12px; background: #fcfcff; }
.t3-reply-box > span { display: block; color: #767d96; font-size: 11px; margin: 0 0 9px; }
.t3-replies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.t3-replies button { display: flex; align-items: center; gap: 8px; padding: 11px 10px; border: 1px solid #dcd4fa; border-radius: 10px; background: #f3efff; color: #44327d; text-align: left; line-height: 1.45; font-size: 11px; }
.t3-replies button:hover, .t3-replies button:focus-visible { background: #eae3ff; border-color: #7560d4; }
.t3-replies b { font-weight: 500; font-size: 10px; color: #8a76b8; }
.t3-replies i { margin-left: auto; font-style: normal; }
.t3-generating { margin: 12px 0 18px 40px; font-size: 12px; }
.t3-text-button { display: block; border: 0; background: transparent; text-decoration: underline; color: #6742b5; padding: 8px 0; font-size: 11px; }
.t3-choice-confirmation { margin: 14px 0 8px !important; font-size: 12px; color: #655080; }
.t3-screen.t1-marina .t1-message--user { width: 85%; max-width: 85%; }
.t3-delivered { text-align: center; padding: 14px; color: #58428d; font-size: 15px; font-weight: 600; }
.t3-slide-placeholder { min-width: 0; border-radius: 12px; border: 1px solid #dedfeb; overflow: hidden; background: #eeebf5; color: #7c7294; }
.t3-slide-placeholder > div { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 12px; background: linear-gradient(110deg, #eeebf5 25%, #faf9ff 45%, #eeebf5 65%); background-size: 240% 100%; animation: t3-loading 2s linear infinite; }
.t3-slide-placeholder > small { display: block; padding: 10px; font-size: 10px; }
.t3-sent-slides .t3-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; gap: 8px; }
.t3-sent-slides .t3-thumbnail > span { font-size: 9px; padding: 7px; }
@keyframes t3-loading { to { background-position: -240% 0; } }
@media (max-width: 760px) {
  .t3-sent-slides .t3-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .t3-sent-slides .t3-thumbnail { border-radius: 6px; }
  .t3-sent-slides .t3-thumbnail > span { display: none; }
  .t3-screen.t1-marina .t3-delivered { padding: 6px; font-size: 11px; }
}
.t3-screen .t3-viewer { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 20px 30px; border: 0; border-radius: 0; background: #111118; color: #fff; overflow: auto; }
.t3-viewer[open] { display: flex; flex-direction: column; }
.t3-viewer::backdrop { background: #111118; }
body:has(.t3-viewer[open]) { overflow: hidden; }
.t3-viewer header, .t3-viewer footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.t3-viewer header > span { color: #c6c7d6; }
.t3-viewer header b { color: #fff; font-weight: 500; }
.t3-viewer-tools { display: flex; align-items: center; gap: 12px; }
.t3-viewer .t3-zoom { width: auto; padding: 0 16px; border-radius: 24px; font-size: 12px; }
.t3-viewer button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #53535e; border-radius: 50%; background: #23232e; color: #fff; font-size: 21px; flex: 0 0 auto; }
.t3-viewer button:disabled { opacity: .3; cursor: default; }
.t3-viewer-stage { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; padding: 18px 0; overflow: auto; }
.t3-viewer-stage img { display: block; width: 100%; height: 100%; max-width: 1440px; object-fit: contain; }
.t3-viewer-stage.is-zoomed { display: block; }
.t3-viewer-stage.is-zoomed img { width: max(1200px, 100%); max-width: none; height: auto; }
.t3-viewer footer { width: min(100%, 550px); margin: 0 auto; text-align: center; }
@media (max-width: 760px) {
  .t3-screen.t1-source { padding: 16px 12px; }
  .t3-materials { grid-template-columns: 1fr; gap: 14px; }
  .t3-material { padding: 14px 12px; }
  .t3-material h2 { font-size: 17px; }
  .t3-material .artifact-preview { --artifact-preview-height: 140; }
  .t3-material-check { font-size: 9px; padding: 6px 8px; }
  .t3-screen.t1-source .t1-actions { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 5; border-top: 3px solid #dad7f4; box-shadow: 0 -8px 24px #30285124; background: #eeebff; }
  .t3-screen.t1-source .t1-actions p { margin-bottom: 4px; }
  .t3-screen .t1-workspace-inner { width: 100%; padding: 0; }
  .t3-screen .t1-heading h1 { font-size: 23px; }
  .t3-screen .t1-chat { height: max(490px, calc(100dvh - 225px)); }
  .t3-screen .t1-input-row textarea { height: 150px; }
  .t3-screen .t1-feed { padding: 16px 12px; }
  .t3-screen .t1-message--ai { display: block; }
  .t3-screen .t1-message--ai > .t1-ai-icon { margin-bottom: 8px; width: 26px; height: 26px; font-size: 11px; }
  .t3-screen .t1-message--user { max-width: 94%; }
  .t3-screen .t1-bubble p { font-size: 12px; }
  .t3-gallery { grid-template-columns: 1fr; width: 100%; max-width: 360px; gap: 12px; }
  .t3-thumbnail > span { font-size: 10px; }
  .t3-screen .t1-composer { padding: 10px; }
  .t3-reply-box { padding: 10px; }
  .t3-replies { grid-template-columns: 1fr; gap: 5px; }
  .t3-replies button { padding: 8px 10px; font-size: 11px; min-height: 36px; }
  .t3-generating { margin-left: 0; }
  .t3-screen.t1-marina .t1-message--user { width: 100%; max-width: 100%; }
  .t3-screen .t3-viewer { padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
  .t3-viewer header, .t3-viewer footer { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .t3-thumbnail { transition: none; } }

/* Keep the first WorkAI avatar beside its reply; later replies use a quiet tint. */
@media (max-width: 760px) {
  .t3-screen .t1-message--ai { display: flex; align-items: flex-start; gap: 7px; }
  .t3-screen .t1-message--ai > .t1-ai-icon { display: none; }
  .t3-screen .t1-feed > .t1-message--ai > .t1-ai-icon { display: inline-flex; margin: 2px 0 0; width: 24px; height: 24px; }
  .t3-screen .t1-message--ai > .t1-bubble { flex: 1; width: 100%; padding: 11px; border: 1px solid #e5dff5; border-radius: 0 14px 14px; background: #f5f2fc; }
}
