.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.article-editor-shell {
  display: grid;
  gap: 16px;
}

.article-editor-shell .page-header,
.article-editor-shell .manual-article-editor-notice {
  margin-bottom: 0;
}

.editor-publish-settings {
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
}

.editor-publish-settings .section-title {
  margin-bottom: 10px;
}

.editor-publish-settings-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(170px, auto) minmax(220px, 1fr);
  gap: 12px 18px;
  align-items: end;
}

.editor-publish-mode-summary strong {
  display: block;
  color: #1e3a8a;
}

.editor-publish-settings .editor-schedule-toggle {
  min-height: 42px;
  margin: 0;
}

.editor-publish-settings .editor-schedule-field {
  width: min(100%, 320px);
  margin: 0;
}

.editor-schedule-disabled-note {
  grid-column: 2 / -1;
  margin: 0;
}

.editor-body {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #ffffff;
  line-height: 1.9;
  outline: none;
}

.editor-body h2 {
  margin-top: 1.5em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.editor-body h3 {
  margin-top: 1.3em;
}

.editor-body h4 {
  margin-top: 1.15em;
}

.editor-body table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.editor-body th,
.editor-body td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.editor-body blockquote {
  margin: 18px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--primary);
  background: #f8fafc;
}

.editor-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  line-height: 1.65;
}

.manual-article-editor-notice {
  margin: 0 0 16px;
}

.manual-article-origin-pill {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.manual-article-editor-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.manual-article-editor-meta,
.manual-article-image-plan,
.article-preview-summary {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.manual-article-editor-meta dl {
  margin: 0;
}

.manual-article-editor-meta dl > div {
  display: grid;
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
}

.manual-article-editor-meta dt {
  color: var(--muted);
  font-weight: 700;
}

.manual-article-editor-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.article-preview {
  min-width: 0;
}

.article-preview [data-article-preview-document] {
  overflow-wrap: anywhere;
}

.article-preview-summary p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.editor-blogger-label strong {
  display: block;
  margin: 2px 0 4px;
  color: #1e3a8a;
}

.editor-article-tags {
  margin-top: 18px;
}

.article-preview-public-body .blogger-post-tags {
  color: #6b7280;
}

.article-preview-public-body .blogger-post-sources,
.article-preview-public-body .blogger-post-sources a {
  color: #9ca3af;
}

.article-preview-public-body .blogger-post-sources a:hover,
.article-preview-public-body .blogger-post-sources a:focus-visible {
  color: #6b7280;
  text-decoration: underline !important;
}

.openai-result-tags {
  overflow-wrap: anywhere;
  color: #4b5563;
}

.mock-result {
  margin-top: 14px;
}

.mock-result-success {
  color: #047857;
  font-weight: 700;
}

.mock-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mock-editor-body {
  min-height: 280px;
  margin-top: 12px;
}

.generation-actions .btn {
  flex: 1 1 180px;
}

.generation-inputs {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.generation-inputs:disabled {
  opacity: 0.72;
}

.btn-openai {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #ffffff;
}

.btn-openai:hover:not(:disabled) {
  background: #6d28d9;
}

.openai-result {
  border-color: #c4b5fd;
}

.web-research-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #99f6e4;
  border-radius: 2px;
  background: #f0fdfa;
}

.web-research-panel .section-title h3 {
  margin: 0;
}

.web-research-inputs {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.web-research-inputs:disabled {
  opacity: 0.72;
}

.btn-web-research {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.web-research-panel .btn-web-research {
  width: 100%;
}

.btn-web-research:hover:not(:disabled) {
  background: #115e59;
}

.web-research-status {
  min-height: 1.3em;
  margin-bottom: 6px;
}

.btn-manual-web-research {
  width: 100%;
  border-color: #7c3aed;
  color: #6d28d9;
  background: #ffffff;
}

.btn-manual-web-research:hover:not(:disabled) {
  background: #f5f3ff;
}

.modal.manual-web-research-modal {
  width: min(1100px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  scroll-padding-block: 20px;
}

.manual-web-research-content,
.manual-research-section {
  min-width: 0;
}

.manual-research-section {
  margin-top: 18px;
}

.manual-research-section h3 {
  margin: 0 0 10px;
}

.manual-research-section ol {
  margin: 8px 0;
  padding-left: 22px;
}

.manual-research-section li {
  margin: 5px 0;
}

.manual-research-conditions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.manual-research-conditions > div,
.manual-research-technical-conditions > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.manual-research-condition-keyword {
  grid-column: span 2;
}

.manual-research-conditions dt,
.manual-research-technical-conditions dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.manual-research-conditions dd,
.manual-research-technical-conditions dd {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 700;
}

.manual-research-technical-details {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.manual-research-technical-conditions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.manual-research-disclosure > summary {
  min-height: 44px;
  padding: 10px 8px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  line-height: 1.5;
}

.manual-research-disclosure > summary::-webkit-details-marker {
  display: none;
}

.manual-research-disclosure > summary:hover {
  background: rgba(255, 255, 255, 0.58);
}

.manual-research-disclosure > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.manual-research-disclosure[open] > summary {
  margin-bottom: 8px;
}

.manual-research-disclosure-panel {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manual-research-usage-details .manual-research-disclosure-panel {
  padding: 0 8px 2px;
}

.manual-web-research-prompt,
.manual-web-research-result-input,
.manual-web-research-sources-input {
  width: 100%;
  max-width: 100%;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: auto;
  line-height: 1.65;
}

.manual-web-research-content textarea.manual-web-research-prompt {
  height: 196px;
  min-height: 160px;
  max-height: 60vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f8fafc;
}

.manual-research-edit-section textarea.manual-web-research-result-input {
  height: 420px;
  min-height: 360px;
  max-height: 75vh;
}

.manual-research-edit-section textarea.manual-web-research-sources-input {
  height: 120px;
  min-height: 100px;
  max-height: 50vh;
}

.manual-research-edit-section .field:last-child {
  margin-bottom: 0;
}

.manual-web-research-edit-notice {
  margin-top: 0;
}

.manual-web-research-content > .manual-web-research-actions:last-child {
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.manual-web-research-actions {
  margin-top: 12px;
}

.manual-web-research-status {
  min-height: 24px;
  margin: 16px 0 0;
}

.manual-web-research-result {
  margin-top: 18px;
  overflow-wrap: anywhere;
}

.manual-web-research-workspace-result {
  margin-top: 16px;
}

.manual-web-research-saved-card {
  border-color: #c4b5fd;
}

.manual-web-research-saved-meta {
  align-items: flex-start;
}

.manual-web-research-preview {
  max-height: 28rem;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}

.manual-web-research-saved-actions {
  flex-wrap: wrap;
}

.manual-web-research-source-view {
  min-height: 320px;
  max-height: 60vh;
}

.manual-web-research-copy-fallback {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.modal.manual-article-modal {
  width: min(960px, 100%);
  max-height: min(92vh, 880px);
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}

.manual-article-content {
  min-width: 0;
}

.manual-article-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.manual-article-options-grid:disabled {
  opacity: 0.7;
}

.manual-article-check-field {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.manual-article-check-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.manual-article-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.manual-article-meta > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.manual-article-meta dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.manual-article-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.manual-article-prompt-section {
  margin-top: 18px;
}

.manual-article-prompt {
  width: 100%;
  max-width: 100%;
  height: 360px;
  min-height: 260px;
  max-height: 70vh;
  resize: vertical;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f8fafc;
}

.manual-article-status {
  min-height: 24px;
  margin: 16px 0 0;
}

.manual-article-actions {
  flex-wrap: wrap;
  margin-top: 12px;
}

.manual-article-details {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.manual-article-details > summary {
  min-height: 44px;
  padding: 10px 8px;
  cursor: pointer;
  font-weight: 800;
}

.manual-article-details > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.manual-article-copy-fallback {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.manual-article-result-section,
.manual-article-document-shell {
  min-width: 0;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.manual-article-result-warning {
  line-height: 1.65;
}

.manual-article-result-input {
  width: 100%;
  max-width: 100%;
  height: 420px;
  min-height: 280px;
  max-height: 72vh;
  resize: vertical;
  overflow: auto;
  white-space: pre;
  overflow-wrap: normal;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.manual-article-result-input[readonly] {
  cursor: wait;
  opacity: 0.72;
  background: #f8fafc;
}

.manual-article-result-input:focus-visible,
.manual-article-document-fullscreen [data-toggle-manual-article-preview-fullscreen]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.manual-article-result-toolbar,
.manual-article-conflict-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.manual-article-result-count {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.manual-article-result-count.field-error {
  color: var(--danger);
}

.manual-article-document-preview {
  width: min(100%, 780px);
  min-width: 0;
  max-height: 68vh;
  margin: 14px auto 0;
  padding: clamp(24px, 5vw, 54px);
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  color: #172033;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.manual-article-document-main-title {
  margin: 0 0 30px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.manual-article-document-preview section {
  margin-top: 30px;
}

.manual-article-document-preview section > h2,
.manual-article-document-heading {
  margin: 0 0 12px;
  color: #24324a;
  line-height: 1.35;
}

.manual-article-document-preview p {
  margin: 0 0 16px;
  white-space: pre-wrap;
}

.manual-article-document-summary {
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: #f6f8ff;
}

.manual-article-document-body-content > h2,
.manual-article-document-body-content > h3,
.manual-article-document-body-content > h4 {
  margin-top: 30px;
}

.manual-article-document-body-content ul,
.manual-article-document-body-content ol {
  margin: 12px 0 20px;
  padding-left: 26px;
}

.manual-article-document-body-content li {
  margin: 6px 0;
}

.manual-article-document-body-content hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid #dbe3ef;
}

.manual-article-document-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-article-document-tag {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.88rem;
  font-weight: 700;
}

.manual-article-markdown-table {
  width: 100%;
  margin: 18px 0 24px;
  border-collapse: collapse;
  table-layout: fixed;
}

.manual-article-markdown-table th,
.manual-article-markdown-table td {
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.manual-article-markdown-table th {
  background: #f1f5f9;
  font-weight: 800;
}

.modal.manual-article-modal.manual-article-document-fullscreen {
  width: calc(100vw - 24px);
  height: calc(100vh - 24px);
  max-height: none;
}

.manual-article-document-fullscreen .manual-article-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.manual-article-document-fullscreen .manual-article-document-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.manual-article-document-fullscreen .manual-article-document-preview {
  flex: 1;
  width: min(100%, 1100px);
  max-height: none;
}

.manual-article-document-fullscreen .manual-article-meta,
.manual-article-document-fullscreen .manual-article-prompt-details,
.manual-article-document-fullscreen .manual-article-details,
.manual-article-document-fullscreen .manual-article-status,
.manual-article-document-fullscreen .manual-article-content > .notice-box {
  display: none;
}

.web-research-result {
  border-color: #5eead4;
}

.web-research-memo {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
}

.web-research-memo > div {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}

.web-research-list ul,
.web-research-list ol {
  padding-left: 22px;
}

.web-research-list li {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.web-research-list a {
  overflow-wrap: anywhere;
}

.web-research-citation-text {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.web-research-citation-link {
  margin-top: 4px;
}

.openai-editor-body {
  white-space: pre-wrap;
}

.summary-box,
.source-box,
.notice-box {
  border-radius: var(--radius);
  padding: 14px;
  margin: 16px 0;
}

.summary-box {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
}

.notice-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.source-box {
  background: #f8fafc;
  border: 1px solid var(--line);
}

.thumbnail-card {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(15, 159, 143, 0.86)),
    linear-gradient(45deg, #dbeafe, #ecfeff);
  color: #ffffff;
}

.thumbnail-card strong {
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  line-height: 1.32;
}

.image-slot {
  border: 1px dashed #9ca3af;
  border-radius: var(--radius);
  padding: 14px;
  background: #f9fafb;
  color: var(--muted);
  margin: 12px 0;
}

.context-menu {
  position: fixed;
  z-index: 70;
  width: 224px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
}

.context-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
}

.context-menu button:hover:not(:disabled) {
  background: #eef2ff;
}

.rewrite-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-box {
  min-height: 130px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  line-height: 1.6;
}

.workflow-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
}

.workflow-toolbar-top,
.workflow-action-group,
.workflow-mode-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-toolbar-top {
  justify-content: space-between;
}

.workflow-mode-selector {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.workflow-action-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workflow-mode-selector button {
  min-width: 84px;
  min-height: 38px;
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.workflow-mode-selector button[aria-pressed="true"] {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
}

.workflow-mode-selector button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.workflow-primary {
  min-width: 170px;
}

.workflow-secondary {
  min-width: 130px;
}

.workflow-more-wrap {
  position: relative;
}

.workflow-more {
  min-width: 44px;
  padding-inline: 12px;
  font-size: 1.35rem;
  line-height: 1;
}

.workflow-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  display: grid;
  width: min(280px, calc(100vw - 40px));
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.workflow-menu[hidden] {
  display: none;
}

.workflow-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.workflow-menu-item:hover,
.workflow-menu-item:focus-visible {
  background: #eff6ff;
}

.workflow-menu-item.is-danger {
  color: #b91c1c;
}

.workflow-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

.workflow-steps {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 0 2px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.workflow-step {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.workflow-step.is-completed {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.workflow-step.is-current {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.workflow-option-summary,
.workflow-support-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.workflow-support-note {
  color: #92400e;
}

.workspace-create-pane {
  top: 150px;
  max-height: calc(100vh - 164px);
}

.manual-writing-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.choice-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
  text-align: left;
}

.choice-card strong {
  color: var(--text);
  font-size: 1.02rem;
}

.choice-card.is-available {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.editor-category-field strong {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

.editor-character-count {
  display: block;
  text-align: right;
}

.editor-temporary-save {
  justify-content: flex-end;
}

.workflow-toolbar button:focus-visible,
.workflow-menu-item:focus-visible,
.choice-card:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .editor-layout,
  .rewrite-compare {
    grid-template-columns: 1fr;
  }

  .manual-research-conditions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-toolbar-top {
    align-items: stretch;
  }

  .workspace-create-pane {
    top: auto;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .workflow-toolbar {
    margin-inline: -10px;
    padding: 10px;
    border-radius: 0;
  }

  .workflow-toolbar-top {
    display: grid;
    grid-template-columns: 1fr;
  }

  .editor-publish-settings-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .editor-publish-settings .editor-schedule-field {
    width: 100%;
  }

  .editor-schedule-disabled-note {
    grid-column: auto;
  }

  .workflow-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-mode-selector button {
    min-width: 0;
  }

  .workflow-action-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workflow-action-group.has-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .workflow-primary,
  .workflow-secondary {
    width: 100%;
    min-width: 0;
  }

  .workflow-step {
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .manual-writing-choice-grid {
    grid-template-columns: 1fr;
  }

  .manual-article-editor-meta dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .modal.manual-web-research-modal {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .manual-research-conditions,
  .manual-research-technical-conditions {
    grid-template-columns: 1fr;
  }

  .manual-research-condition-keyword {
    grid-column: auto;
  }

  .manual-web-research-actions .btn {
    width: 100%;
  }

  .modal.manual-article-modal {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .manual-article-options-grid,
  .manual-article-meta {
    grid-template-columns: 1fr;
  }

  .manual-article-actions .btn {
    width: 100%;
  }

  .manual-article-result-input {
    height: 360px;
  }

  .manual-article-result-toolbar,
  .manual-article-conflict-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-article-result-toolbar .btn,
  .manual-article-conflict-actions .btn {
    width: 100%;
  }

  .manual-article-document-preview {
    width: 100%;
    padding: 22px 16px;
    border-radius: 12px;
  }

  .modal.manual-article-modal.manual-article-document-fullscreen {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    max-height: none;
    padding: 12px;
  }
}
