.editor-page,
.detail-page,
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  background:
    radial-gradient(circle at 50% 0%, rgba(41, 151, 255, 0.12), transparent 34rem),
    #f5f5f7;
  color: #1d1d1f;
  padding: 64px 22px 80px;
}

.editor-panel,
.post-detail,
.auth-panel {
  width: min(100%, 860px);
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.08);
}

.editor-panel,
.post-detail { padding: clamp(28px, 6vw, 64px); }

.auth-panel {
  width: min(100%, 480px);
  padding: clamp(28px, 6vw, 48px);
}

.editor-heading { margin-bottom: 36px; }

.page-eyebrow {
  color: #0071e3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.editor-heading h1,
.post-header h1 {
  color: #1d1d1f;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 12px;
}

.editor-heading > p:last-child,
.post-meta {
  color: #6e6e73;
  font-size: 0.94rem;
}

.post-form { display: grid; gap: 26px; }

.form-field { display: grid; gap: 9px; }

.form-field label {
  color: #1d1d1f;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.13);
  outline: 0;
}

.field-help {
  color: #86868b;
  font-size: 0.78rem;
}

.field-error,
.errorlist {
  color: #b42318;
  font-size: 0.8rem;
  list-style: none;
}

.form-alert {
  border: 1px solid #f0b4ad;
  border-radius: 12px;
  background: #fff1f0;
  color: #9f2016;
  padding: 12px 14px;
  font-size: 0.84rem;
}

.rich-editor { display: none; }

.wysiwyg-enhanced [data-wysiwyg-source] { display: none; }

.wysiwyg-enhanced .rich-editor {
  display: block;
  min-height: 360px;
  border-color: #d2d2d7;
  border-radius: 0 0 12px 12px;
  background: #fff;
  font-family: var(--font-system);
  font-size: 1rem;
}

.wysiwyg-enhanced .ql-toolbar {
  border-color: #d2d2d7;
  border-radius: 12px 12px 0 0;
  background: #fafafa;
}

.wysiwyg-enhanced .ql-container { border-color: #d2d2d7; }

.wysiwyg-enhanced .ql-editor {
  min-height: 360px;
  line-height: 1.7;
  padding: 22px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.primary-action {
  border: 0;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 22px;
  transition: background 0.2s, transform 0.2s;
}

.primary-action:hover { background: #0077ed; transform: translateY(-1px); }

.full-width { width: 100%; }

.text-action {
  color: #0066cc;
  font-size: 0.88rem;
  text-decoration: none;
}

.text-action:hover { text-decoration: underline; }

.post-header {
  border-bottom: 1px solid #e8e8ed;
  margin-bottom: 36px;
  padding-bottom: 30px;
}

.post-content {
  color: #2c2c2e;
  font-size: 1.04rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.post-content > * + * { margin-top: 1.2em; }

.post-content h2,
.post-content h3 {
  color: #1d1d1f;
  line-height: 1.25;
  margin-top: 1.7em;
}

.post-content ul,
.post-content ol { padding-left: 1.5em; }

.post-content blockquote {
  border-left: 4px solid #2997ff;
  color: #6e6e73;
  padding-left: 18px;
}

.post-content pre {
  border-radius: 12px;
  background: #1d1d1f;
  color: #f5f5f7;
  overflow-x: auto;
  padding: 18px;
}

.post-content :not(pre) > code {
  border-radius: 5px;
  background: #f0f0f2;
  padding: 0.15em 0.35em;
}

.post-footer {
  border-top: 1px solid #e8e8ed;
  margin-top: 48px;
  padding-top: 24px;
}

@media (max-width: 734px) {
  .editor-page,
  .detail-page,
  .auth-page { padding: 28px 12px 48px; }

  .editor-panel,
  .post-detail,
  .auth-panel { border-radius: 18px; }

  .form-actions { justify-content: space-between; }
}
