.vd-app {
  margin-top: 18px;
}

.vd-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.vd-noteCard,
.vd-sideCard {
  background: rgba(11, 18, 32, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: 0 24px 56px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
}

.vd-noteCard {
  padding: 20px;
}

.vd-sideCard {
  padding: 18px;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 88px;
}

.vd-noteHead {
  margin-bottom: 14px;
}

.vd-noteHead h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
}

.vd-noteIntro {
  margin: 0;
  color: #bfd0e8;
  line-height: 1.68;
  max-width: 72ch;
}

.vd-toolbarWrap {
  margin-bottom: 12px;
}

.vd-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vd-toolBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #eef5ff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.vd-toolBtn em {
  font-style: italic;
  font-weight: 700;
}

.vd-toolBtn u {
  text-decoration-thickness: 2px;
}

.vd-toolBtn:hover,
.vd-toolBtn:focus-visible {
  border-color: rgba(119, 168, 255, .42);
  background: rgba(255,255,255,.10);
}

.vd-colorInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.vd-controlRow {
  margin-bottom: 12px;
}

.vd-interim {
  min-height: 50px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: #c4d4ea;
  line-height: 1.55;
}

.vd-banner {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(97, 160, 255, .22);
  background: rgba(37,99,235,.14);
  color: #eef5ff;
  text-align: left;
  line-height: 1.55;
}

.vd-banner[hidden] {
  display: none;
}

.vd-editorShell {
  position: relative;
}

.vd-editor {
  --vd-line-gap: 2.45rem;
  --vd-line-offset: .6rem;
  min-height: 840px;
  padding: .85rem 18px 1rem 50px;
  border-radius: 24px;
  border: 1px solid rgba(66,52,32,.16);
  color: #2f2414;
  font-size: 18px;
  font-weight: 500;
  line-height: var(--vd-line-gap);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  outline: none;
  background-image:
    linear-gradient(to right, rgba(219, 74, 74, .32) 0, rgba(219, 74, 74, .32) 2px, transparent 2px),
    linear-gradient(to bottom, transparent calc(var(--vd-line-gap) - 2px), rgba(38, 111, 220, .18) calc(var(--vd-line-gap) - 2px), rgba(38, 111, 220, .18) var(--vd-line-gap));
  background-position: 32px 0, 0 var(--vd-line-offset);
  background-size: 100% 100%, 100% var(--vd-line-gap);
  background-repeat: no-repeat, repeat;
  background-color: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  caret-color: #122033;
}

.vd-editor:empty::before {
  content: attr(data-placeholder);
  color: #8a7455;
  font-weight: 500;
}

.vd-editor b,
.vd-editor strong {
  font-weight: 800;
}

.vd-editor i,
.vd-editor em {
  font-style: italic;
}

.vd-editor u {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.vd-editor h1,
.vd-editor h2,
.vd-editor h3,
.vd-editor p,
.vd-editor ul,
.vd-editor ol,
.vd-editor div,
.vd-editor li,
.vd-editor blockquote {
  margin: 0;
  line-height: inherit;
}

.vd-editor h1 {
  font-size: 1.55em;
  font-weight: 800;
}

.vd-editor h2 {
  font-size: 1.35em;
  font-weight: 800;
}

.vd-editor h3 {
  font-size: 1.18em;
  font-weight: 800;
}

.vd-editor ul,
.vd-editor ol {
  padding-left: 1.4em;
}

.vd-editor li::marker {
  color: currentColor;
}

.vd-editor a {
  color: #225dd8;
  text-decoration: underline;
}

.vd-bottomBar {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.vd-actionGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.vd-actionBtn {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 14px;
  white-space: nowrap;
}

.vd-actionBtn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.vd-statsRow {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #bfd0e8;
  font-size: 14px;
}

.vd-statsRow strong {
  color: #ffffff;
}

.vd-field {
  display: grid;
  gap: 8px;
}

.vd-fieldLabel {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a8c1ea;
}

.vd-select {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #ffffff;
  padding: 0 14px;
}

.vd-statusCard,
.vd-sideBlock {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.vd-statusCard {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.vd-statusCard strong,
.vd-statusCard span {
  display: block;
}

.vd-statusText {
  margin-top: 4px;
  color: #bfd0e8;
  line-height: 1.55;
  font-size: 14px;
}

.vd-statusDot {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.35);
  flex: 0 0 auto;
}

.vd-statusDot.is-listening {
  background: #ef4444;
  animation: vdPulse 1.2s infinite;
}

.vd-statusDot.is-working {
  background: #2563eb;
  animation: vdPulse 1.4s infinite;
}

.vd-statusDot.is-error {
  background: #f59e0b;
}

@keyframes vdPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.vd-sideBlock h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #ffffff;
}

.vd-sideBlock p,
.vd-sideList li {
  margin: 0;
  color: #bfd0e8;
  line-height: 1.6;
  font-size: 14px;
}

.vd-sideList {
  margin: 0;
  padding-left: 18px;
}

.vd-sideList li + li {
  margin-top: 6px;
}

.vd-contentSection {
  margin-top: 18px;
  padding: 22px;
}

.vd-contentSection h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.vd-contentSection h3 {
  margin: 18px 0 8px;
}

.vd-contentSection p,
.vd-contentSection li {
  color: #bfd0e8;
  line-height: 1.7;
}

.vd-commandList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 22px;
}

.vd-commandChip {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: #e5eefb;
  line-height: 1.6;
}

.vd-commandChip::before {
  content: '• ';
  color: #7aa2ff;
}

.vd-list {
  margin: 0;
  padding-left: 20px;
}

.vd-list li + li {
  margin-top: 8px;
}

body.vd-focus-open .tg-toolHero,
body.vd-focus-open .tg-copyBlock,
body.vd-focus-open .tg-relatedTop,
body.vd-focus-open .vd-contentSection {
  display: none;
}

.vd-app.is-focus .vd-workspace {
  grid-template-columns: 1fr;
}

.vd-app.is-focus .vd-sideCard,
.vd-app.is-focus .vd-noteHead,
.vd-app.is-focus .vd-toolbarWrap,
.vd-app.is-focus .vd-interim,
.vd-app.is-focus .vd-statsRow {
  display: none;
}

.vd-app.is-focus .vd-noteCard {
  min-height: calc(100vh - 64px);
  padding-bottom: 16px;
}

.vd-app.is-focus .vd-controlRow {
  position: sticky;
  top: 12px;
  z-index: 4;
  margin-bottom: 14px;
}

.vd-app.is-focus .vd-actionGrid {
  grid-template-columns: repeat(3, minmax(0, 180px));
  justify-content: flex-start;
}

.vd-app.is-focus #vd-proofreadBtn,
.vd-app.is-focus #vd-copyBtn,
.vd-app.is-focus #vd-downloadBtn,
.vd-app.is-focus #vd-clearBtn {
  display: none;
}

.vd-app.is-focus .vd-editor {
  min-height: calc(100vh - 180px);
}

@media (max-width: 1100px) {
  .vd-workspace {
    grid-template-columns: 1fr;
  }

  .vd-sideCard {
    position: static;
  }
}

@media (max-width: 860px) {
  .vd-actionGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vd-commandList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .vd-noteCard,
  .vd-sideCard,
  .vd-contentSection {
    padding: 14px;
  }

  .vd-noteHead h2 {
    font-size: 24px;
  }

  .vd-noteIntro,
  .vd-interim,
  .vd-statusText,
  .vd-contentSection p,
  .vd-contentSection li,
  .vd-banner {
    font-size: 14px;
  }

  .vd-toolbar {
    gap: 6px;
  }

  .vd-toolBtn {
    min-width: 36px;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 16px;
  }

  .vd-actionGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .vd-actionBtn {
    min-height: 34px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 12px;
  }

  .vd-editor {
    min-height: 620px;
    padding: .78rem 14px 1rem 44px;
    font-size: 17px;
    background-position: 28px 0, 0 var(--vd-line-offset);
  }

  .vd-app.is-focus .vd-noteCard {
    min-height: calc(100vh - 32px);
  }

  .vd-app.is-focus .vd-editor {
    min-height: calc(100vh - 132px);
  }

  .vd-app.is-focus .vd-actionGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vd-commandList {
    grid-template-columns: 1fr;
  }

  .vd-statsRow {
    gap: 10px;
    font-size: 13px;
  }
}
