/* Measured plain-code variant: ChatGPT, desktop, 2026-09-07. */
.message.agent .message-body .kino-code-block {
  position:relative;
  width:100%;
  min-width:0;
  max-width:100%;
  margin:16px 0 4px;
  padding:0;
  border:1px solid rgba(255,255,255,.08);
  border-radius:24px;
  background:#212121;
  color:#ececec;
  overflow:clip;
  box-sizing:border-box;
  box-shadow:none;
}
.message.agent .message-body .prompt-result.kino-code-block { margin-top:0; }
.kino-code-block > header {
  position:absolute;
  z-index:2;
  inset:4px 8px auto auto;
  display:flex;
  width:36px;
  height:36px;
  margin:0;
  padding:0;
}
.kino-code-block .prompt-copy-button {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:8px;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#ececec;
  cursor:pointer;
}
.kino-code-block .prompt-copy-button:hover { background:rgba(255,255,255,.1); color:#fff; }
.kino-code-block .prompt-copy-button:focus-visible { outline:2px solid #b4b4b4; outline-offset:-2px; }
.kino-code-block .prompt-copy-button svg { width:20px; height:20px; }
.kino-code-block .prompt-code-shell { padding:12px 44px 0 0; min-width:0; }
.kino-code-block .prompt-code-viewport {
  display:flex;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-color:#666 transparent;
  scrollbar-width:auto;
}
.kino-code-block .prompt-code-viewport:focus-visible { outline:1px solid #888; outline-offset:-1px; }
.message.agent .message-body .kino-code-block pre {
  flex:none;
  width:max-content;
  min-width:100%;
  max-width:none;
  height:auto;
  max-height:none;
  margin:0;
  padding:0 20px 12px;
  border:0;
  background:transparent;
  overflow:visible;
  box-sizing:border-box;
  white-space:pre;
  tab-size:4;
}
.message.agent .message-body .kino-code-block pre,
.message.agent .message-body .kino-code-block pre code {
  color:#ececec;
  font:400 12.25px/20px ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
  letter-spacing:normal;
  word-break:normal;
  overflow-wrap:normal;
}
.message.agent .message-body .kino-code-block pre code { padding:0; background:transparent; border:0; }
.kino-code-block.is-revealing pre { min-height:32px; }

/* Natural-language prompt variants, measured from the compact/long references. */
.prompt-export-menu {padding:12px;width:280px;border:1px solid #444;border-radius:20px;background:#353535;color:#ececec;}
.prompt-export-menu::backdrop {background:rgba(0,0,0,.3);}
.prompt-export-menu strong {display:block;padding:8px;font:500 14px/20px system-ui;}
.prompt-export-menu button {display:flex;justify-content:space-between;width:100%;padding:12px 8px;border:0;border-radius:10px;background:transparent;color:inherit;font:14px/20px system-ui;cursor:pointer;}
.prompt-export-menu button:hover,.prompt-export-menu button:focus-visible {background:#484848;}
.prompt-export-menu small {color:#aaa;}
.message.agent .message-body .kino-code-block.is-writing-block {
  background:#2a2a2a;
  border:0;
  overflow:clip;
}
.kino-code-block.is-writing-block > .prompt-writing-toolbar {
  position:relative;
  inset:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  height:56px;
  padding:10px 12px;
  gap:12px;
  background:#2a2a2a;
  box-sizing:border-box;
}
.kino-code-block.is-writing-block > header .prompt-writing-tools {
  display:flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:0;
}
.kino-code-block.is-writing-block > header button {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  width:36px;
  height:36px;
  padding:6px;
  background:transparent;
  border:0;
  color:#ececec;
  border-radius:24px;
  font:500 14px/20px ui-sans-serif,system-ui,"Segoe UI",Arial,sans-serif;
  cursor:pointer;
}
.kino-code-block.is-writing-block > header button:hover {background:#353535;color:#fff;}
.kino-code-block.is-writing-block > header button:focus-visible {outline:2px solid #aaa;outline-offset:1px;}
.kino-code-block.is-writing-block > header button:disabled {opacity:.4;cursor:default;}
.kino-code-block.is-writing-block > header .prompt-edit-button {width:83px;padding:0 12px 0 8px;gap:6px;border:1px solid rgba(255,255,255,.05);}
.kino-code-block.is-writing-block > header .prompt-edit-button span {font:inherit;color:inherit;text-transform:none;letter-spacing:normal;}
.kino-code-block.is-writing-block > header svg {width:20px;height:20px;}
.kino-code-block.is-writing-block .prompt-code-shell {padding:0 20px 16px;}
.kino-code-block.is-writing-block.is-long-block .prompt-code-shell {padding:32px 80px 64px;}
.kino-code-block.is-writing-block .prompt-code-viewport {overflow:visible;display:block;}
.message.agent .message-body .kino-code-block.is-writing-block pre,
.message.agent .message-body .kino-code-block.is-writing-block pre code {
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  padding:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:400 16px/26px ui-sans-serif,system-ui,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
}
.prompt-expanded-editor {
  position:fixed;
  inset:16px;
  width:calc(100% - 32px);
  height:calc(100dvh - 32px);
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:1px solid #444;
  border-radius:24px;
  background:#212121;
  color:#ececec;
  box-sizing:border-box;
}
.prompt-expanded-editor[open] {display:flex;flex-direction:column;}
.prompt-expanded-editor::backdrop {background:rgba(0,0,0,.65);}
.prompt-expanded-editor > header {display:flex;align-items:center;gap:8px;min-height:64px;padding:8px 20px;box-sizing:border-box;}
.prompt-expanded-editor > header > span {flex:1;}
.prompt-expanded-editor button {display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:8px;border:0;border-radius:20px;background:transparent;color:inherit;font:500 14px/20px ui-sans-serif,system-ui,sans-serif;cursor:pointer;}
.prompt-expanded-editor button:hover {background:#353535;}
.prompt-expanded-editor button:focus-visible {outline:2px solid #aaa;}
.prompt-expanded-editor svg {width:20px;height:20px;}
.prompt-expanded-editor .prompt-editor-save {padding:8px 20px;background:#ececec;color:#171717;}
.prompt-expanded-editor .prompt-editor-scroll {flex:1;min-height:0;overflow:auto;padding:32px 24px 48px;}
.prompt-expanded-editor textarea {display:block;resize:none;overflow:hidden;width:min(688px,100%);min-height:320px;margin:0 auto;padding:0;border:0;outline:0;background:transparent;color:inherit;box-sizing:border-box;font:400 16px/26px ui-sans-serif,system-ui,"Segoe UI",sans-serif;}
.prompt-expanded-editor footer {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 24px;border-top:1px solid #333;font:12px/18px ui-sans-serif,system-ui,sans-serif;color:#aaa;}
@media (max-width:767px) {
  .kino-code-block.is-writing-block.is-long-block .prompt-code-shell {padding:16px 20px 32px;}
  .prompt-expanded-editor {inset:0;width:100%;height:100dvh;border-radius:0;}
}
