:root {
  --pdf-gap: 10px;
  --pdf-top: 72px;
  --pdf-thumb-width: 118px;
  --pdf-surface: #171a1e;
  --pdf-surface-raised: #1d2228;
  --pdf-line: rgba(255,255,255,.10);
  --pdf-muted: rgba(233,241,247,.56);
  --pdf-accent: #27c596;
  --pdf-accent-soft: rgba(39,197,150,.14);
}

.pdf-workbench-shell {
  --pdf-thumb-width: var(--sidebar-width);
  --content-left: var(--sidebar-width);
  min-height: 100vh;
}

.pdf-workbench-shell.sidebar-open {
  --pdf-thumb-width: var(--sidebar-width);
  --content-left: var(--sidebar-width);
}

.pdf-workbench-shell .chat-rail {
  width: var(--pdf-thumb-width);
  align-items: stretch;
  gap: 12px;
  padding: 14px 9px;
}

.pdf-workbench-shell .rail-action {
  align-self: center;
  flex: 0 0 auto;
}

.pdf-thumb-strip {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-thumb-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.pdf-thumb-item {
  position: relative;
  width: 100%;
  display: block;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px;
  padding: 4px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 8px 22px rgba(0,0,0,.20);
  cursor: pointer;
}

.pdf-thumb-item:hover {
  border-color: rgba(134,183,255,.36);
  background: rgba(134,183,255,.10);
}

.pdf-thumb-item.active {
  border-color: rgba(25,210,143,.78);
  box-shadow:
    0 0 0 1px rgba(25,210,143,.34),
    0 10px 26px rgba(0,0,0,.24);
}

.pdf-thumb-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: contain;
  object-position: top center;
  border-radius: 6px;
  background: #f7fafc;
}

.pdf-thumb-item span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-width: 19px;
  border-radius: 999px;
  padding: 1px 5px;
  color: #fff;
  background: rgba(0,0,0,.58);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.pdf-thumb-item.active span {
  color: #062216;
  background: #19d28f;
}

.pdf-thumb-empty {
  margin: 18px 0 0;
  color: rgba(255,255,255,.46);
  text-align: center;
  font-size: 11px;
}

.pdf-library-sidebar .sidebar-brand strong {
  letter-spacing: 0;
}

.pdf-library-sidebar .sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdf-library-sidebar .sidebar-label span {
  min-width: 26px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 2px 8px;
  color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.06);
  text-align: center;
  font-size: 11px;
}

.pdf-workbench-shell:not(.public-share-shell)::after {
  display: none;
}

.pdf-stage {
  grid-column: 2;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px 18px 36px;
}

html.babel-page-tabs-ready .pdf-stage {
  height: calc(100vh - var(--babel-page-tabs-height));
  padding-top: 14px;
}

.pdf-workbench {
  --pdf-page-column: 42%;
  min-height: calc(100vh - 104px);
  height: auto;
  display: grid;
  grid-template-columns: minmax(320px, var(--pdf-page-column)) 12px minmax(380px, 1fr);
  grid-template-rows: minmax(540px, 72vh) auto;
  grid-template-areas:
    "page splitter preview"
    "page splitter compose";
  gap: var(--pdf-gap);
  align-content: start;
  padding-bottom: 18px;
}

html.babel-page-tabs-ready .pdf-workbench {
  min-height: calc(100vh - var(--babel-page-tabs-height) - 64px);
}

.pdf-head {
  grid-area: head;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 2px;
}

.pdf-head > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.pdf-head strong {
  flex: 0 0 auto;
  color: #fff;
  font-size: 17px;
  letter-spacing: 0;
}

.pdf-head span {
  min-width: 0;
  margin: 0;
  color: var(--pdf-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-actions,
.pdf-compose {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-actions {
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pdf-actions button,
.pdf-actions input,
.pdf-compose button,
.pdf-compose select,
.pdf-page-toolbar button,
.pdf-page-toolbar input {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.065);
  color: rgba(255,255,255,.84);
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.pdf-actions input {
  width: 54px;
  padding: 0 7px;
  cursor: text;
  text-align: center;
  outline: none;
}

.pdf-page-toolbar input {
  cursor: text;
  text-align: center;
  outline: none;
}

.pdf-actions input:focus,
.pdf-page-toolbar input:focus {
  border-color: rgba(134,183,255,.62);
  color: #fff;
}

.pdf-view-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 2px;
}

.pdf-view-tools button {
  min-width: 30px;
  padding: 0 8px;
}

.pdf-view-tools span {
  min-width: 42px;
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.pdf-view-tools button.active {
  border-color: rgba(25,210,143,.46);
  color: #eafff4;
  background: rgba(25,210,143,.16);
}

.pdf-actions button:hover,
.pdf-page-toolbar button:hover,
.pdf-compose button:hover,
.pdf-compose select:focus {
  border-color: rgba(134,183,255,.62);
  color: #fff;
}

.pdf-actions button:disabled,
.pdf-actions input:disabled,
.pdf-compose button:disabled,
.pdf-page-toolbar button:disabled,
.pdf-page-toolbar input:disabled {
  opacity: .52;
  cursor: not-allowed;
}

#chatPdfPageLabel {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 0 10px;
  color: rgba(255,255,255,.68);
  background: rgba(255,255,255,.045);
  font-size: 12px;
  white-space: nowrap;
}

.pdf-page-pane {
  grid-area: page;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  padding: 10px 10px 26px;
  border: 1px solid var(--pdf-line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(31,36,42,.92), rgba(15,17,20,.96));
  box-shadow: 0 18px 42px rgba(0,0,0,.20);
}

.pdf-page-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(23,26,30,.94);
  backdrop-filter: blur(10px);
}

.pdf-page-navigation,
.pdf-page-toolbar .pdf-view-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pdf-page-toolbar button,
.pdf-page-toolbar input {
  min-height: 30px;
}

.pdf-page-toolbar input {
  width: 82px;
  min-width: 82px;
  box-sizing: border-box;
  padding: 0 24px 0 10px;
  text-align: center;
}

.pdf-page-stage {
  align-self: center;
  flex: 0 0 auto;
  margin-top: 10px;
}

.pdf-pane-splitter {
  grid-area: splitter;
  position: relative;
  min-height: 100%;
  cursor: col-resize;
  touch-action: none;
  outline: none;
  user-select: none;
}

.pdf-pane-splitter::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.12);
  transition: background .16s ease, box-shadow .16s ease;
}

.pdf-pane-splitter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 44px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.58) 0 3px, transparent 3px 8px);
  box-shadow: 0 0 0 5px rgba(15,17,20,.82);
  opacity: .72;
  transition: opacity .16s ease, background .16s ease;
}

.pdf-pane-splitter:hover::before,
.pdf-pane-splitter:focus-visible::before,
.pdf-pane-splitter.is-dragging::before {
  background: rgba(25,210,143,.78);
  box-shadow: 0 0 16px rgba(25,210,143,.24);
}

.pdf-pane-splitter:hover::after,
.pdf-pane-splitter:focus-visible::after,
.pdf-pane-splitter.is-dragging::after {
  opacity: 1;
}

body.pdf-pane-resizing,
body.pdf-pane-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.pdf-page-stage {
  position: relative;
  --pdf-page-zoom: 1;
  width: min(100%, 560px);
  height: auto;
  min-height: 0;
  display: block;
  padding: 0;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.035) 75%),
    #111317;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  touch-action: pan-x pan-y;
  user-select: none;
}

.pdf-page-stage.is-panning,
.pdf-page-stage.is-panning * {
  cursor: grabbing !important;
  user-select: none !important;
}

.pdf-page-stage img {
  display: block;
  width: calc(100% * var(--pdf-page-zoom));
  max-width: none;
  max-height: none;
  height: auto;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 16px 48px rgba(0,0,0,.36);
  transition: opacity .14s ease;
}

.pdf-page-stage.is-loading img {
  opacity: .42;
}

.pdf-selection {
  position: absolute;
  border: 2px solid #19d28f;
  background: rgba(25,210,143,.16);
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.18),
    0 0 0 1px rgba(255,255,255,.32) inset;
  pointer-events: none;
}

.pdf-selection-generate {
  position: absolute;
  z-index: 3;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 7px;
  padding: 0 12px;
  color: #effff7;
  background: rgba(8,111,82,.92);
  box-shadow: 0 6px 14px rgba(2,33,24,.22);
  font: 800 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}

.pdf-selection-generate:hover:not(:disabled) {
  background: #087a5c;
}

.pdf-selection-generate:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.pdf-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.48);
  font-size: 14px;
}

.pdf-preview-pane {
  grid-area: preview;
  min-width: 0;
  min-height: 540px;
  height: 100%;
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--pdf-line);
  border-radius: 14px;
  background: var(--pdf-surface);
  box-shadow: 0 18px 42px rgba(0,0,0,.20);
}

.pdf-preview-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(90deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
}

.pdf-preview-head strong {
  color: rgba(255,255,255,.92);
  font-size: 13px;
}

.pdf-preview-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.pdf-preview-head span {
  color: rgba(255,255,255,.46);
  font-size: 12px;
}

.pdf-preview-head button {
  min-height: 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.76);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pdf-preview-head button:not(:disabled):hover,
.pdf-preview-head button.active {
  border-color: rgba(25,210,143,.46);
  color: #eafff4;
  background: rgba(25,210,143,.16);
}

.pdf-preview-head button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.pdf-artifact-strip {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.028);
}

.pdf-artifact-strip[hidden] {
  display: none !important;
}

.pdf-artifact-label {
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.pdf-artifact-list {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.pdf-artifact-item {
  flex: 0 0 166px;
  width: 166px;
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 1px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  padding: 4px 8px;
  color: rgba(255,255,255,.74);
  background: rgba(255,255,255,.045);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.pdf-artifact-item:hover,
.pdf-artifact-item.active {
  border-color: rgba(25,210,143,.42);
  color: #f2fff8;
  background: rgba(25,210,143,.13);
}

.pdf-artifact-item span,
.pdf-artifact-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-artifact-item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: rgba(234,255,244,.56);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-artifact-item span {
  font-size: 11px;
  font-weight: 850;
}

.pdf-artifact-item small {
  color: rgba(255,255,255,.46);
  font-size: 10px;
}

.pdf-artifact-item.active small {
  color: rgba(234,255,244,.68);
}

.pdf-preview-empty {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: rgba(255,255,255,.44);
  text-align: center;
  font-size: 13px;
}

.pdf-preview-empty[hidden] {
  display: none !important;
}

.pdf-preview-content[hidden] {
  display: none !important;
}

.pdf-preview-content {
  min-height: 0;
  height: 100%;
  display: block;
  overflow: hidden;
  background: #f8fafc;
}

.pdf-preview-pane:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.pdf-preview-frame {
  display: block;
  width: 100%;
  height: 100% !important;
  min-height: 100%;
  border: 0;
  background: #fff;
}

.pdf-svg-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.pdf-svg-preview svg {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

.pdf-svg-step-player {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.pdf-svg-step-player .svg-step-controls {
  flex: 0 0 auto;
}

.pdf-svg-step-player .pdf-preview-frame {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
}

.pdf-preview-stream {
  margin: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 16px;
  color: rgba(255,255,255,.78);
  background: rgba(0,0,0,.18);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.58;
}

.pdf-preview-code,
.pdf-latex-preview {
  margin: 0;
  width: 100%;
  overflow: auto;
  padding: 16px;
  color: rgba(238,246,255,.90);
  background: #111417;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
}

.pdf-preview-code {
  height: 100%;
}

.pdf-latex-result {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #111417;
}

.pdf-latex-rendered {
  overflow-x: auto;
  padding: 22px 24px;
  color: #111827;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-size: 17px;
}

.pdf-preview-code span {
  display: inline-flex;
  margin-bottom: 10px;
  border: 1px solid rgba(25,210,143,.28);
  border-radius: 999px;
  padding: 2px 8px;
  color: #bfffe4;
  background: rgba(25,210,143,.10);
  font-size: 10px;
  font-weight: 850;
}

.pdf-preview-code code,
.pdf-latex-preview code {
  display: block;
  white-space: pre-wrap;
}

.pdf-rendered-doc {
  height: 100%;
  overflow: auto;
  padding: 22px 26px 40px;
  color: #172033;
  background: #fff;
  font-size: 15px;
  line-height: 1.72;
}

.pdf-rendered-doc h1,
.pdf-rendered-doc h2,
.pdf-rendered-doc h3,
.pdf-rendered-doc h4 {
  margin: 0 0 12px;
  color: #0f172a;
  line-height: 1.3;
}

.pdf-rendered-doc p,
.pdf-rendered-doc ul,
.pdf-rendered-doc pre {
  margin: 0 0 12px;
}

.pdf-rendered-doc ul {
  padding-left: 22px;
}

.pdf-rendered-doc code {
  border-radius: 5px;
  padding: 1px 5px;
  color: #0f766e;
  background: #eefcf8;
}

.pdf-rendered-doc pre {
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  color: #e5edf8;
  background: #111827;
}

.pdf-rendered-doc mjx-container[jax="CHTML"][display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 3px 0;
}

.pdf-markdown-svg-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.pdf-markdown-svg-section h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 16px;
}

.pdf-markdown-svg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.pdf-markdown-svg-grid figure {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pdf-markdown-svg-grid .pdf-svg-preview {
  min-height: 220px;
  height: auto;
}

.pdf-markdown-svg-grid figcaption {
  border-top: 1px solid #eef2f7;
  padding: 7px 10px;
  color: #64748b;
  font-size: 12px;
}

.pdf-compose {
  grid-area: compose;
  position: relative;
  align-items: stretch;
  padding: 9px;
  border: 1px solid var(--pdf-line);
  border-radius: 12px;
  background: rgba(22,26,30,.88);
}

.pdf-compose select {
  color: rgba(255,255,255,.88);
  background: rgba(8,10,12,.84);
}

.pdf-compose-prompt {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(8,10,12,.74);
}

.pdf-compose-mode {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(25,210,143,.44);
  border-radius: 999px;
  color: #dfffee;
  background: rgba(25,210,143,.14);
  font-size: 11px;
  font-weight: 850;
  justify-self: start;
  white-space: nowrap;
}

.pdf-compose-mode.is-custom {
  border-color: rgba(134,183,255,.48);
  color: #eaf2ff;
  background: rgba(134,183,255,.14);
}

.pdf-compose-prompt textarea {
  width: 100%;
  resize: none;
  min-height: 38px;
  max-height: 100px;
  box-sizing: border-box;
  padding: 8px 6px;
  border: 0;
  outline: none;
  color: rgba(255,255,255,.88);
  background: transparent;
  font: inherit;
  line-height: 1.45;
}

.pdf-compose-prompt:focus-within {
  border-color: rgba(25,210,143,.42);
  box-shadow: 0 0 0 3px rgba(25,210,143,.12);
}

#chatPdfGenerateBtn {
  min-width: 68px;
  border-color: rgba(39,197,150,.54);
  background: var(--pdf-accent-soft);
  color: #e5fff5;
  font-weight: 850;
}

#chatPdfSettingsBtn {
  min-width: 82px;
  border-color: rgba(134,183,255,.42);
  color: #eaf2ff;
  background: rgba(134,183,255,.11);
  font-weight: 800;
}

#chatPdfSettingsBtn:hover:not(:disabled),
#chatPdfSettingsBtn[aria-expanded="true"] {
  border-color: rgba(134,183,255,.72);
  background: rgba(134,183,255,.22);
}

#chatPdfSettingsBtn.has-personalization {
  border-color: rgba(25,210,143,.48);
  color: #d7fff0;
  background: rgba(25,210,143,.12);
}

.pdf-generation-settings {
  position: absolute;
  z-index: 36;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(540px, calc(100vw - 76px));
  max-height: min(62vh, 520px);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(134,183,255,.35);
  border-radius: 14px;
  color: rgba(238,246,255,.92);
  background: rgba(22,26,30,.98);
  box-shadow: 0 18px 46px rgba(0,0,0,.48);
  backdrop-filter: blur(16px);
}

.pdf-generation-settings[hidden] {
  display: none;
}

.pdf-generation-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pdf-generation-settings-head > div {
  display: grid;
  gap: 3px;
}

.pdf-generation-settings-head strong {
  color: #fff;
  font-size: 14px;
}

.pdf-generation-settings-head span,
.pdf-generation-settings-note {
  color: var(--pdf-muted);
  font-size: 11px;
  line-height: 1.45;
}

#chatPdfSettingsCloseBtn {
  flex: 0 0 auto;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  font-size: 20px;
  line-height: 1;
}

.pdf-generation-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.pdf-setting-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pdf-setting-field > span {
  color: rgba(238,246,255,.72);
  font-size: 11px;
  font-weight: 750;
}

.pdf-setting-field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

#chatPdfPageMarkdownBtn {
  border-color: rgba(134,183,255,.46);
  color: #eaf2ff;
  background: rgba(134,183,255,.13);
  font-weight: 800;
}

#chatPdfPageMarkdownBtn:hover:not(:disabled) {
  border-color: rgba(134,183,255,.72);
  background: rgba(134,183,255,.22);
}

.pdf-personalization {
  display: grid;
  grid-template-columns: minmax(165px, .9fr) minmax(240px, 2.4fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(134,183,255,.26);
  border-radius: 9px;
  background: rgba(134,183,255,.055);
}

.pdf-personalization-copy {
  display: grid;
  gap: 3px;
}

.pdf-personalization-copy strong {
  color: rgba(238,246,255,.92);
  font-size: 12px;
}

.pdf-personalization-copy span {
  color: var(--pdf-muted);
  font-size: 11px;
  line-height: 1.45;
}

.pdf-personalization textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  min-height: 54px;
  max-height: 100px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  outline: none;
  color: rgba(255,255,255,.88);
  background: rgba(8,10,12,.74);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.pdf-personalization textarea:focus {
  border-color: rgba(25,210,143,.42);
  box-shadow: 0 0 0 3px rgba(25,210,143,.12);
}

.pdf-personalization-actions {
  display: flex;
  gap: 6px;
}

.pdf-page-markdown-action {
  grid-column: 1 / -1;
  min-height: 36px;
  border-color: rgba(134,183,255,.46) !important;
  color: #eaf2ff;
  background: rgba(134,183,255,.13) !important;
  font-weight: 800;
}

.pdf-status {
  grid-area: status;
  min-height: 18px;
  margin: 0 2px;
  color: var(--pdf-muted);
  font-size: 12px;
}

.pdf-sidebar-primary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 0 14px;
  color: rgba(255,255,255,.84);
  background: rgba(255,255,255,.06);
  text-decoration: none;
  font-weight: 700;
  font: inherit;
  cursor: pointer;
}

.pdf-sidebar-primary:hover {
  color: #fff;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
}

.pdf-upload-limit {
  margin: -4px 4px 0;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  text-align: center;
}

.sidebar-actions .pdf-asset-filter {
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  padding: 0 10px;
  color: rgba(255,255,255,.68);
  background: rgba(255,255,255,.045);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pdf-asset-filter:hover,
.pdf-asset-filter.active {
  border-color: rgba(77,211,158,.5);
  color: #c8f8e3;
  background: rgba(25,210,143,.13);
}

.pdf-assets-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-asset-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.pdf-asset-row {
  min-width: 0;
  position: relative;
}

.pdf-asset-item {
  min-width: 0;
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px 178px 10px 11px;
  color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.055);
  text-align: left;
  cursor: pointer;
}

.pdf-asset-item:hover,
.pdf-asset-item.active {
  border-color: rgba(134,183,255,.34);
  color: #fff;
  background: rgba(134,183,255,.12);
}

.pdf-asset-item strong,
.pdf-asset-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-asset-item strong {
  font-size: 13px;
}

.pdf-asset-item small {
  color: rgba(255,255,255,.46);
  font-size: 11px;
}

.pdf-asset-item .pdf-asset-owner {
  color: rgba(159,234,207,.82);
  font-weight: 700;
}

.pdf-asset-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pdf-asset-delete {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  padding: 0;
  color: rgba(255,255,255,.58);
  background: rgba(255,255,255,.045);
  display: inline-grid;
  place-items: center;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pdf-asset-share {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(134, 183, 255, .42);
  border-radius: 999px;
  background: rgba(134, 183, 255, .08);
  color: rgba(193, 221, 255, .95);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.pdf-asset-link {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: rgba(232, 241, 255, .82);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.pdf-asset-link:hover:not(:disabled) {
  border-color: rgba(134, 183, 255, .56);
  background: rgba(134, 183, 255, .15);
  color: #fff;
}

.pdf-asset-link.is-active {
  border-color: rgba(249, 206, 102, .45);
  color: rgba(255, 230, 155, .98);
}

.pdf-asset-share:hover:not(:disabled) {
  border-color: rgba(159, 234, 207, .65);
  background: rgba(93, 228, 176, .16);
  color: #d9ffeb;
  transform: translateY(-1px);
}

.pdf-asset-share.is-shared {
  border-color: rgba(93, 228, 176, .52);
  background: rgba(93, 228, 176, .16);
  color: rgba(190, 255, 220, .98);
}

.pdf-asset-share:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.pdf-asset-delete:hover:not(:disabled) {
  border-color: rgba(255,99,99,.52);
  color: #ffe7e7;
  background: rgba(255,99,99,.14);
}

.pdf-asset-delete:disabled {
  opacity: .52;
  cursor: not-allowed;
}

#chatPdfDeleteBtn:not(:disabled):hover {
  border-color: rgba(255,99,99,.52);
  color: #ffe7e7;
  background: rgba(255,99,99,.14);
}

@media (max-width: 920px) {
  .pdf-workbench-shell {
    --pdf-thumb-width: var(--sidebar-width);
    --content-left: var(--sidebar-width);
  }

  .pdf-stage {
    height: 100vh;
    padding: 10px 10px 30px;
  }

  html.babel-page-tabs-ready .pdf-stage {
    height: calc(100vh - var(--babel-page-tabs-height));
    padding-top: 10px;
  }

  .pdf-workbench {
    min-height: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(360px, 58vh) minmax(360px, 58vh) auto;
    grid-template-areas:
      "page"
      "preview"
      "compose";
    gap: 10px;
  }

  html.babel-page-tabs-ready .pdf-workbench {
    min-height: 0;
  }

  .pdf-pane-splitter {
    display: none;
  }

  .pdf-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pdf-compose {
    flex-wrap: wrap;
  }

  .pdf-compose-prompt {
    order: -1;
    flex-basis: 100%;
    grid-template-columns: 1fr;
  }

  .pdf-compose-prompt textarea {
    min-height: 46px;
  }

  .pdf-generation-settings {
    left: 0;
    right: 0;
    width: auto;
    max-height: min(62vh, 560px);
  }

  .pdf-generation-settings-grid {
    grid-template-columns: 1fr;
  }

  .pdf-page-markdown-action {
    grid-column: auto;
  }

  .pdf-personalization {
    grid-template-columns: 1fr;
  }

  .pdf-personalization-actions {
    justify-content: flex-end;
  }

  .pdf-actions button,
  .pdf-actions input,
  .pdf-compose button,
  .pdf-compose select {
    min-height: 30px;
    padding: 0 9px;
  }
}
