body {
  --editor-navy: #102a46;
  --editor-rail: #3f668a;
  --editor-paper: #fbfdff;
  --editor-pad: clamp(13px, 2.5vw, 24px);
  background: linear-gradient(165deg, #dbe7f1, #f0f5f8 34rem, #e7eff5);
}
.site-header, .footer { background: #fbfdff; }
.editor-nav { justify-content: space-between; gap: 10px; }
.editor-main { padding-block: clamp(15px, 3vw, 36px); }
.editor-panel-head, .editor-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.editor-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(95px, 11vw, 130px);
  overflow: hidden;
  padding: clamp(17px, 2.7vw, 26px) clamp(20px, 4vw, 48px);
  border: 1px solid #284765;
  border-radius: 16px 16px 0 0;
  background:
    radial-gradient(ellipse at 88% 18%, #568db95f, transparent 48%),
    repeating-linear-gradient(128deg, transparent 0 27px, #7ea8d00c 27px 28px),
    linear-gradient(110deg, #0c2137, #123657 65%, #224b70);
  box-shadow: inset 0 1px #d5eeff44, inset 0 -1px #081c33;
  color: #f0f7ff;
}
.editor-intro::before {
  content: ''; position: absolute; inset: 22% auto 22% 0; width: 3px;
  border-radius: 0 3px 3px 0; background: #87c9f2; box-shadow: 2px 0 16px #74bcf55c;
}
.editor-intro-copy { position: relative; z-index: 1; max-width: 34rem; }
.editor-intro h1 { margin: 0 0 5px; max-width: none; font-size: clamp(32px, 4.5vw, 47px); line-height: 1.03; letter-spacing: -.045em; }
.editor-intro p { color: #d1e3f5; font-size: clamp(14px, 1.7vw, 17px); }
.editor-intro-art {
  position: absolute;
  right: clamp(25px, 9vw, 128px);
  top: 50%;
  width: clamp(74px, 10vw, 125px);
  aspect-ratio: 1.28;
  transform: translateY(-50%) rotate(-12deg);
  pointer-events: none;
}
.editor-intro-art::before, .editor-intro-art::after {
  content: '';
  position: absolute;
  top: 0;
  width: 58%;
  height: 100%;
  border: 1px solid #cadcf1;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, #49749d 7px 8px) center / 70% 65% no-repeat,
    linear-gradient(145deg, #eef6ff, #93abc5 88%);
  box-shadow: inset 0 1px #fff8, 0 4px #102440, 0 14px 22px #071a32a3;
}
.editor-intro-art::before { left: 2%; transform: skewY(10deg); }
.editor-intro-art::after { right: -8%; transform: skewY(-10deg); }
.editor-intro-art > span {
  position: absolute;
  z-index: 1;
  top: 6%;
  right: -19%;
  width: 7%;
  height: 117%;
  border: 1px solid #c4e6ff9c;
  border-radius: 30% 30% 50% 50% / 7% 7% 16% 16%;
  background: linear-gradient(90deg, #234c74, #b6daf7 45%, #3e6f99 80%);
  box-shadow: 5px 2px 9px #07294490;
  transform: rotate(29deg);
}
.editor-command-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  align-items: flex-start;
  padding: clamp(12px, 1.8vw, 20px);
  background: linear-gradient(180deg, #fafcfe, #e9f0f6);
  border: 1px solid #b6c8d8; border-top: 0; border-radius: 0 0 16px 16px;
  box-shadow: 0 7px 18px #1539550f;
}
.editor-command-bar .button, .editor-file-menu > summary { min-height: 44px; white-space: nowrap; }
.editor-file-menu > summary {
  padding: 10px 12px;
  border: 1px solid #b5c9db;
  border-radius: 8px;
  background: #f9fcff;
  color: var(--editor-navy);
  font-weight: 650;
  cursor: pointer;
}
.editor-file-options {
  display: grid;
  gap: 6px;
  padding-block: 8px 4px;
}
.editor-file-options .button { justify-content: flex-start; }
.editor-file-options #editor-delete { border-color: #dfc8ca; color: #853a41; }
.editor-file-options .portal-link { min-height: 44px; }
.editor-file-options .editor-note { margin: 0 4px; }
.editor-command-bar > .editor-actions { align-items: flex-start; }
.editor-upload-feedback:has(.editor-status:empty):has(button[hidden]) { display: none; }
.editor-note, .editor-count, .editor-status { color: var(--muted); }
.editor-note, .editor-status, .editor-count { font-size: .875rem; }
.editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.editor-actions .button, .editor-count { white-space: nowrap; }
.editor-status { margin-block: 9px; }
.editor-status:empty { display: none; }
.editor-status[data-error="true"] { color: #8b292d; }
.editor-workspace { margin-top: clamp(16px, 2.2vw, 26px); }
.editor-panel, .editor-conflict {
  min-width: 0;
  background: var(--editor-paper);
  border: 1px solid #9eb5ca;
  border-radius: 12px;
  padding: var(--editor-pad);
  box-shadow: 0 8px 20px #193a5e1a;
}
.editor-panel h2, .editor-conflict h2, .editor-dialog h2 { font-size: clamp(18px, 2.6vw, 23px); letter-spacing: -.03em; }
.editor-panel h2, .editor-conflict h2, .editor-dialog h2 {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.editor-writing { display: flex; flex-direction: column; gap: 14px; }
.editor-project-fields { width: min(100%, 40rem); }
.editor-project-field { display: grid; gap: 4px; }
.editor-project-field .editor-note { margin: 0; line-height: 1.45; }
.editor-project-field #editor-title { width: 100%; box-shadow: inset 0 1px 2px #0d294709; }
.editor-settings-bank { border: 1px solid #a9bdcf; border-radius: 10px; background: #f7fafc; overflow: clip; }

.editor-panel-banner {
  min-height: 58px;
  margin: calc(-1 * var(--editor-pad)) calc(-1 * var(--editor-pad)) 8px;
  padding: 9px var(--editor-pad);
  border-bottom: 1px solid var(--editor-rail);
  border-radius: 11px 11px 0 0;
  background: linear-gradient(104deg, #13304c, #21496c);
  box-shadow: inset 0 1px #daedff52;
  color: #f0f7ff;
}
.editor-panel-banner .editor-count { color: #dcefff; font-variant-numeric: tabular-nums; }
.editor-panel-banner .editor-actions { gap: 6px 10px; }
.editor-panel-banner .button { padding-inline: 10px; }
.editor-writing label, .editor-invite-form label, .editor-writers-form label { font-weight: 650; }
.editor-writing input, .editor-invite-form input, .editor-writers-form textarea {
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  background: #fff;
  border: 1px solid #b4cadd;
  border-radius: 8px;
  padding: 9px 11px;
  min-height: 44px;
  min-width: 0;
}

.editor-upload-status { margin: 0; }
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 7px clamp(8px, 1.25vw, 14px);
  background: linear-gradient(180deg, #eaf1f6, #dde8f0);
  border-bottom: 1px solid #b7c9d8;
}
.editor-toolbar button, .editor-toolbar select {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 9px;
  color: var(--blue-dark);
  border: 1px solid #b4cadd;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #e8f1fa);
  font: inherit;
  font-weight: 610;
  box-shadow: inset 0 1px #fff;
  cursor: pointer;
}
.editor-toolbar button:hover:not(:disabled) { background: #dcecf9; }
.editor-toolbar button:disabled { opacity: .55; cursor: default; }
.editor-toolbar select { max-inline-size: 146px; }
#editor-toolbar { scroll-margin-top: 1rem; }
.editor-paper {
  background: #fff;
  border: 1px solid #aebfce;
  border-left: 3px solid #3875a5;
  border-radius: 4px 9px 9px 4px;
  box-shadow: 0 2px 0 #e6edf2, 0 4px 0 -1px #c3d1dc, 0 8px 20px #1238580c;
}
.editor-placeholder {
  position: absolute;
  inset-block-start: clamp(18px, 3.7vw, 44px);
  inset-inline: clamp(18px, 3.7vw, 44px);
  max-width: 72ch;
  margin-inline: auto;
  pointer-events: none;
  color: #586e82;
  font: 400 20px/1.65 var(--pp-prompt-font, system-ui, sans-serif);
}
.editor-paper { position: relative; }
.editor-paper:focus-within .editor-placeholder { visibility: hidden; }
.editor-paper:focus-within { outline: 2px solid #3478b4; outline-offset: 2px; }
#editor-text {
  position: relative;
  max-width: 80ch;
  min-height: clamp(300px, 45dvh, 580px);
  margin-inline: auto;
  padding: clamp(18px, 3.7vw, 44px);
  outline: none;
  color: #172f49;
  font: normal 400 20px/1.65 var(--pp-prompt-font, system-ui, sans-serif);
  white-space: pre-wrap;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  font-variant-ligatures: none;
  cursor: text;
}
#editor-text[aria-readonly="true"] { cursor: default; }
#editor-text p, #editor-text h2, #editor-text h3, #editor-text strong, #editor-text em, #editor-text u, #editor-text [data-legacy-font] {
  margin: 0; font: inherit; letter-spacing: normal; text-decoration: none; white-space: inherit; overflow: visible;
}
#editor-text .pp-editor-speaker-cue {
  display: flex; align-items: center; gap: .5em; width: fit-content; max-width: 100%;
  margin: 8px 0 2px; padding: 2px 10px; border: 1px solid #c2d3e2; border-radius: 6px;
  color: #19324a; background: #f1f6fb; font: 650 .8rem/1.5 system-ui, sans-serif; cursor: default;
}
#editor-text .pp-editor-speaker-cue {
  --cue-ink: #243444;
  color: var(--cue-ink);
  border-inline-start: 3px solid var(--cue-ink);
}
.pp-editor-speaker-dot { width: .67em; height: .67em; border-radius: 50%; background: var(--cue-ink); flex: none; }
#editor-text .pp-editor-speaker-cue[data-color="blue"] { --cue-ink: #2056a2; }
#editor-text .pp-editor-speaker-cue[data-color="teal"] { --cue-ink: #00695e; }
#editor-text .pp-editor-speaker-cue[data-color="red"] { --cue-ink: #a23c37; }
#editor-text .pp-editor-speaker-cue[data-color="plum"] { --cue-ink: #753d83; }
#editor-text .ProseMirror-selectednode { outline: 2px solid #367bb7; }
#editor-text.ProseMirror-hideselection ::selection { background: transparent; }
#editor-text.ProseMirror-hideselection { caret-color: transparent; }
#editor-text img.ProseMirror-separator { display: inline; width: 0; margin: 0; border: 0; }
.editor-helper, .editor-sharing, .editor-conflict { margin-top: 14px; }
.editor-helper, .editor-sharing { border-top: 3px solid #58799b; }
.editor-conflict { background: #fff9ed; border-color: #d9bf89; }
.editor-conflict .editor-actions { margin-top: 8px; }
.editor-suggestions, .editor-picker-list, .editor-invites-list { list-style: none; margin: 0; padding: 0; }
.editor-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 10px; }
.editor-suggestions:not(:empty) { margin-top: 13px; }
.editor-suggestion {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fcff;
  overflow-x: auto;
  overflow-wrap: normal;
}
.editor-suggestion dl { margin: 0 0 9px; }
.editor-suggestion dt { color: var(--muted); font-size: 13px; font-weight: 650; }
.editor-suggestion dd { margin: 0 0 7px; white-space: pre-wrap; }
.editor-suggestion dd[data-kind="original"] { color: #68323c; }
.editor-suggestion dd[data-kind="suggested"] { color: #215949; }
.editor-suggestion .editor-note { margin-top: 8px; }
.editor-dialog {
  border: 1px solid #b4cadd;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  width: min(calc(100% - 24px), 620px);
  max-height: 85vh;
  max-height: 85dvh;
  overflow: auto;
  padding: clamp(12px, 3vw, 24px);
  box-shadow: 0 16px 40px #10284455;
}
.editor-dialog::backdrop { background: #10284488; }
.editor-dialog-head { margin-bottom: 12px; }
.editor-share-trigger { gap: 7px; }
.editor-share-symbol { width: 18px; height: 18px; flex: none; }
.editor-export-dialog { width: min(calc(100% - 24px), 390px); }
.editor-export-dialog h3 { margin: 18px 0 8px; font-size: 16px; }
.editor-export-dialog .editor-note { margin: 0 0 10px; }
.editor-share-formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 2vw, 9px);
}
.editor-share-format {
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 82px;
  padding: 9px 4px;
  white-space: nowrap;
}
.editor-share-format-symbol { width: 32px; height: 32px; flex: none; }
.editor-share-word .editor-share-format-symbol { color: #2366ba; }
.editor-share-pdf .editor-share-format-symbol { color: #a63842; }
.editor-share-text .editor-share-format-symbol { color: #247786; }
.editor-picker-list, .editor-invites-list { display: grid; gap: 7px; }
.editor-picker-list:not(:empty), .editor-invites-list:not(:empty) { margin-block: 8px; }
.editor-picker-list, .editor-invites-list { grid-template-columns: minmax(0, 1fr); }
.editor-picker-list button, .editor-invites-list li > span {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.editor-picker-list button { width: 100%; text-align: start; }
.editor-invites-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.editor-invite-field { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-invite-field input { flex: 1 1 190px; }
.editor-invite-form .editor-note { margin-top: 6px; }
.editor-writers-form:not([hidden]), .editor-writers-results:not([hidden]) { display: grid; gap: 8px; }
.editor-writers-form textarea { width: 100%; resize: vertical; }
.editor-copy-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--editor-paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.editor-writers-form > button { justify-self: start; }
.editor-writers-results p { white-space: pre-wrap; }
.editor-writers-results h3 { font-size: 16px; }
.editor-writers-results ul { padding-inline-start: 22px; }
.editor-writers-results .button { margin-top: 8px; }
.editor-rewrite-dialog { width: min(calc(100% - 24px), 660px); }
.editor-rewrite-dialog label { font-weight: 650; }
.editor-rewrite-dialog .editor-note a { font-weight: 650; }
.editor-rewrite-result:not([hidden]) { display: grid; gap: 12px; }
.editor-rewrite-result > h3, .editor-rewrite-result > p { margin: 0; }
.editor-rewrite-result > h3 { color: #153753; font-size: 1.1rem; }
.editor-rewrite-paper {
  min-width: 0; border: 1px solid #c1d2df; border-radius: 8px;
  background: #fff; color: #172f49; overflow: hidden;
}
.editor-rewrite-paper > :is(summary, h4) {
  margin: 0; padding: 9px 13px; background: #eef4f9; color: #28485f; font: 650 .9rem/1.5 system-ui, sans-serif;
}
.editor-rewrite-paper > summary { cursor: pointer; }
.editor-rewrite-paper > div {
  padding: 13px; max-height: min(39dvh, 360px); overflow: auto; overflow-wrap: anywhere;
  white-space: pre-wrap; font: 400 18px/1.55 var(--pp-prompt-font, system-ui, sans-serif);
}
.editor-rewrite-paper p, .editor-rewrite-paper ul { margin: 0 0 .6em; }
.editor-rewrite-paper :last-child { margin-bottom: 0; }
.editor-rewrite-speaker { font: 650 .85rem/1.5 system-ui, sans-serif; }
#editor-open-studio {
  background: #1b507a;
  color: #fff;
}
#editor-open-studio:hover:not(:disabled) { background: #133b60; }
#editor-open-studio:disabled { cursor: default; }
#editor-latest-script { white-space: pre-wrap; overflow-x: auto; overflow-wrap: normal; hyphens: none; background: #f3f8ff; padding: 11px; border-radius: 8px; }
@media (max-width: 720px) {
  .editor-main, .editor-nav { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .editor-intro-copy { max-width: calc(100% - 68px); }
  .editor-intro-art { right: 24px; opacity: .65; }
  .editor-writing { gap: 12px; }
  .editor-command-bar { gap: 10px; }
}
@media (max-width: 500px) {
  .editor-nav .brand { font-size: 16px; gap: 5px; }
  .editor-nav .brand-mark { width: 32px; height: 32px; }
  .editor-nav .header-account, .editor-command-bar .button { padding-inline: 9px; }
  .editor-command-bar .button { font-size: 13px; }
  .editor-toolbar { gap: 5px; }
  .editor-toolbar button, .editor-toolbar select { font-size: 14px; }
}
@media (max-width: 350px) {
  .editor-nav .brand { font-size: 14px; }
  .editor-nav .brand-mark { width: 26px; height: 26px; }
}
