
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body.site-community-write {
  --write-board-bg: rgba(9, 16, 19, 0.82);
  --write-board-muted-bg: rgba(13, 22, 25, 0.9);
  --write-field-bg: rgba(255, 255, 255, 0.055);
  --write-field-border: rgba(198, 233, 221, 0.18);
  --write-field-hover: rgba(104, 199, 238, 0.10);
  --write-field-text: var(--text-strong);
  --write-placeholder: rgba(211, 226, 222, 0.46);
  --editor-toolbar-bg: rgba(15, 23, 27, 0.96);
  --editor-toolbar-border: rgba(198, 233, 221, 0.16);
  --editor-toolbar-divider: rgba(198, 233, 221, 0.18);
  --editor-toolbar-text: rgba(230, 241, 238, 0.92);
  --editor-toolbar-hover-bg: color-mix(in srgb, var(--accent) 12%, transparent);
  --editor-toolbar-active-bg: rgba(104, 199, 238, 0.18);
  --editor-toolbar-active-border: rgba(104, 199, 238, 0.52);
  --editor-toolbar-accent: #68c7ee;
  --editor-popover-bg: #121d21;
  --editor-doc-bg: #0f171a;
  --editor-doc-text: #e9f2ef;
  --editor-doc-muted: rgba(233, 242, 239, 0.66);
  --editor-doc-border: rgba(198, 233, 221, 0.18);
  --editor-doc-link: #68c7ee;
}

html[data-theme="light"] body.site-community-write {
  --write-board-bg: rgba(255, 255, 255, 0.78);
  --write-board-muted-bg: rgba(255, 255, 255, 0.86);
  --write-field-bg: rgba(255, 255, 255, 0.74);
  --write-field-border: rgba(16, 39, 42, 0.14);
  --write-field-hover: rgba(26, 115, 232, 0.08);
  --write-field-text: #17211d;
  --write-placeholder: rgba(23, 33, 29, 0.42);
  --editor-toolbar-bg: #f8fafd;
  --editor-toolbar-border: #dfe3e8;
  --editor-toolbar-divider: #dadce0;
  --editor-toolbar-text: #202124;
  --editor-toolbar-hover-bg: #edf2fa;
  --editor-toolbar-active-bg: #dbe8ff;
  --editor-toolbar-active-border: #c2d7ff;
  --editor-toolbar-accent: #1a73e8;
  --editor-popover-bg: #fff;
  --editor-doc-bg: #fff;
  --editor-doc-text: #17211d;
  --editor-doc-muted: #48525a;
  --editor-doc-border: #dfe3e8;
  --editor-doc-link: #1a73e8;
}

body.site-community-write .forum-head {
  margin-bottom: 14px;
}

body.site-community-write .forum-head h1 {
  font-size: 2.25rem;
  line-height: 1.05;
}

body.site-community-write .write-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body.site-community-write .editor-board {
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: max(680px, calc(100svh - var(--nav-height, 74px) - 36px));
  border-color: var(--write-field-border);
  background: var(--write-board-bg);
}

body.site-community-write .board-toolbar {
  border-bottom: 1px solid var(--write-field-border);
  background: var(--write-board-muted-bg);
}

body.site-community-write .write-title-row {
  min-height: 72px;
  padding: 14px 18px;
}

body.site-community-write .post-back-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

body.site-community-write .post-back-btn svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site-community-write .write-fields {
  display: grid;
  grid-template-columns: 210px 190px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-bottom: 0;
  background: transparent;
}

body.site-community-write .write-category-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--write-field-border);
  border-radius: 8px;
  background: var(--write-field-bg);
  padding: 0 12px;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}

body.site-community-write .write-category-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

body.site-community-write .write-category-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

body.site-community-write .write-category-select-wrap::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

body.site-community-write .write-category-select,
body.site-community-write #post-title,
body.site-community-write .write-actions input {
  min-height: 46px;
  border: 1px solid var(--write-field-border);
  border-radius: 8px;
  background: var(--write-field-bg);
  color: var(--write-field-text);
  padding: 0 12px;
  outline: none;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}

body.site-community-write .write-category-select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding-right: 38px;
  padding-left: 0;
  font-size: 0.84rem;
  font-weight: 900;
}

body.site-community-write .write-category-select option {
  background: var(--surface-solid);
  color: var(--text);
}

body.site-community-write #post-title {
  font-size: 1rem;
  font-weight: 800;
}

body.site-community-write #post-title::placeholder,
body.site-community-write .write-actions input::placeholder {
  color: var(--write-placeholder);
}

body.site-community-write .write-category-field:hover,
body.site-community-write .write-category-select:hover,
body.site-community-write #post-title:hover,
body.site-community-write .write-actions input:hover {
  border-color: rgba(104, 199, 238, 0.34);
  background: var(--write-field-hover);
}

body.site-community-write .write-category-field:focus-within,
body.site-community-write .write-category-select:focus,
body.site-community-write #post-title:focus,
body.site-community-write .write-actions input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

body.site-community-write.site-notice-write .write-category-field {
  grid-template-columns: 42px minmax(0, 1fr);
  border-color: rgba(104, 199, 238, 0.32);
  background: rgba(104, 199, 238, 0.1);
}

body.site-community-write.site-notice-write .write-category-field > span {
  color: var(--text-strong);
}

body.site-community-write.site-notice-write .write-category-select {
  color: var(--text-strong);
  opacity: 1;
}

body.site-community-write .editor-toolbar {
  position: sticky;
  top: 74px;
  z-index: 15;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 50px;
  gap: 0;
  overflow: visible;
  border-top: 1px solid var(--editor-toolbar-border);
  border-bottom: 1px solid var(--editor-toolbar-border);
  background: var(--editor-toolbar-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  color: var(--editor-toolbar-text);
  padding: 7px 12px;
}

body.site-community-write .editor-toolbar-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  height: 36px;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid var(--editor-toolbar-divider);
}

body.site-community-write .editor-toolbar-group:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
}

body.site-community-write .editor-toolbar button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--editor-toolbar-text);
  padding: 0;
  font: inherit;
  line-height: 1;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}

body.site-community-write .editor-toolbar button:hover,
body.site-community-write .editor-toolbar button:focus-visible {
  border-color: var(--editor-toolbar-active-border);
  background: var(--editor-toolbar-hover-bg);
  color: var(--editor-toolbar-accent);
  outline: none;
}

body.site-community-write .editor-toolbar button:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

body.site-community-write .editor-toolbar button.is-active {
  border-color: var(--editor-toolbar-active-border);
  background: var(--editor-toolbar-active-bg);
  color: var(--editor-toolbar-accent);
}

body.site-community-write .editor-tool-svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site-community-write .editor-icon-label,
body.site-community-write .editor-type-step {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  color: currentColor;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
}

body.site-community-write .editor-type-step {
  width: auto;
  min-width: 22px;
  font-size: 0.75rem;
}

body.site-community-write .editor-type-step.is-large {
  font-size: 0.82rem;
}

body.site-community-write .editor-icon-label.strong {
  font-weight: 950;
}

body.site-community-write .editor-icon-label.italic {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 950;
}

body.site-community-write .editor-icon-label.underline {
  border-bottom: 2px solid currentColor;
  padding-bottom: 1px;
}

body.site-community-write .editor-icon-label.strike {
  text-decoration: line-through;
}

body.site-community-write .editor-size-group {
  gap: 4px;
}

body.site-community-write .editor-size-control {
  display: inline-flex;
  align-items: center;
  height: 34px;
}

body.site-community-write .editor-size-control input {
  width: 52px;
  height: 30px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 6px;
  background: var(--editor-popover-bg);
  color: var(--editor-toolbar-text);
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

body.site-community-write .editor-size-control input::-webkit-outer-spin-button,
body.site-community-write .editor-size-control input::-webkit-inner-spin-button {
  margin: 0;
}

body.site-community-write .editor-symbol {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  color: currentColor;
}

body.site-community-write .editor-symbol::before,
body.site-community-write .editor-symbol::after {
  content: "";
  position: absolute;
  display: block;
}

body.site-community-write .editor-symbol-ul {
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2px) 1px 3px / 5px 5px no-repeat,
    radial-gradient(circle, currentColor 0 2px, transparent 2px) 1px 8px / 5px 5px no-repeat,
    radial-gradient(circle, currentColor 0 2px, transparent 2px) 1px 13px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 8px 4px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 9px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 14px / 10px 2px no-repeat;
}

body.site-community-write .editor-symbol-ol {
  background:
    linear-gradient(currentColor 0 0) 8px 4px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 9px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 14px / 10px 2px no-repeat;
}

body.site-community-write .editor-symbol-ol::before,
body.site-community-write .editor-symbol-ol::after {
  left: 1px;
  color: currentColor;
  font-size: 0.45rem;
  font-weight: 950;
  line-height: 1;
}

body.site-community-write .editor-symbol-ol::before {
  content: "1";
  top: 1px;
}

body.site-community-write .editor-symbol-ol::after {
  content: "2";
  top: 8px;
}

body.site-community-write .editor-symbol-quote::before {
  content: "\201C";
  left: 2px;
  top: -7px;
  color: currentColor;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  line-height: 1;
}

body.site-community-write .editor-symbol-align {
  background:
    linear-gradient(currentColor 0 0) var(--align-a, 0) 3px / 18px 2px no-repeat,
    linear-gradient(currentColor 0 0) var(--align-b, 0) 8px / 13px 2px no-repeat,
    linear-gradient(currentColor 0 0) var(--align-c, 0) 13px / 16px 2px no-repeat;
}

body.site-community-write .editor-symbol-align-center {
  --align-a: 50%;
  --align-b: 50%;
  --align-c: 50%;
}

body.site-community-write .editor-symbol-align-right {
  --align-a: 100%;
  --align-b: 100%;
  --align-c: 100%;
}

body.site-community-write .editor-symbol-link::before,
body.site-community-write .editor-symbol-link::after {
  top: 5px;
  width: 10px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: rotate(-28deg);
}

body.site-community-write .editor-symbol-link::before {
  left: 0;
}

body.site-community-write .editor-symbol-link::after {
  right: 0;
}

body.site-community-write .editor-symbol-youtube::before {
  inset: 3px 1px;
  border-radius: 5px;
  background: #ea4335;
}

body.site-community-write .editor-symbol-youtube::after {
  left: 7px;
  top: 6px;
  width: 0;
  height: 0;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

body.site-community-write .editor-symbol-clear::before {
  left: 2px;
  top: 5px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-20deg);
}

body.site-community-write .editor-symbol-clear::after {
  left: 1px;
  bottom: 1px;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #c5221f;
}

body.site-community-write .editor-color-wrap {
  position: relative;
}

body.site-community-write .editor-color-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 22px;
  color: var(--editor-toolbar-accent);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 -4px 0 currentColor;
}

body.site-community-write .editor-color-icon > span {
  transform: translateY(-1px);
}

body.site-community-write .editor-color-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 9px);
  left: -8px;
  display: grid;
  width: 238px;
  gap: 10px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 8px;
  background: var(--editor-popover-bg);
  box-shadow: 0 18px 40px rgba(32, 33, 36, 0.28);
  padding: 10px;
}

body.site-community-write .editor-color-popover.hidden {
  display: none;
}

body.site-community-write .editor-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 30px);
  gap: 7px;
}

body.site-community-write .editor-color-popover button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--editor-toolbar-text);
}

body.site-community-write .editor-color-popover .editor-color-swatch {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: var(--editor-toolbar-divider);
  border-radius: 6px;
  padding: 0;
}

body.site-community-write .editor-color-popover .editor-color-swatch:hover,
body.site-community-write .editor-color-popover .editor-color-swatch:focus-visible {
  border-color: var(--editor-toolbar-accent);
  background: var(--editor-toolbar-hover-bg);
}

body.site-community-write .color-dot {
  display: block;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(32, 33, 36, 0.22);
  border-radius: 50%;
  background: var(--color-option, #202124);
}

body.site-community-write .editor-rainbow-option {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  gap: 9px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

body.site-community-write .editor-rainbow-option:hover,
body.site-community-write .editor-rainbow-option:focus-visible {
  border-color: var(--editor-toolbar-divider);
  background: var(--editor-toolbar-hover-bg);
}

body.site-community-write .editor-rainbow-dot {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(32, 33, 36, 0.18);
  border-radius: 50%;
  background: conic-gradient(#ff7171, #ffb86b, #ffe66d, #8ff0aa, #68c7ee, #b79cff, #ff7171);
}

body.site-community-write .editor-custom-color-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.site-community-write .rich-editor {
  width: min(calc(100% - 36px), 920px);
  min-height: 520px;
  max-height: none;
  overflow-y: auto;
  margin: 18px auto 22px;
  border: 1px solid var(--editor-doc-border);
  border-radius: 8px;
  background: var(--editor-doc-bg);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  color: var(--editor-doc-text);
  padding: 38px 44px;
  line-height: 1.5;
  outline: none;
  overflow-wrap: anywhere;
}

body.site-community-write .rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--editor-doc-muted);
}

body.site-community-write .rich-editor:focus {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24), 0 0 0 3px rgba(26, 115, 232, 0.16);
}

body.site-community-write .rich-editor p,
body.site-community-write .rich-editor div {
  margin: 0 0 10px;
}

body.site-community-write .rich-editor h2,
body.site-community-write .rich-editor h3 {
  margin: 14px 0 8px;
  color: var(--editor-doc-text);
  line-height: 1.25;
}

body.site-community-write .rich-editor blockquote {
  margin: 10px 0;
  border-left: 3px solid var(--editor-doc-link);
  padding-left: 12px;
  color: var(--editor-doc-muted);
}

body.site-community-write .rich-editor ul,
body.site-community-write .rich-editor ol {
  margin: 8px 0 12px;
  padding-left: 24px;
}

body.site-community-write .rich-editor a {
  color: var(--editor-doc-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.site-community-write .rich-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

body.site-community-write .editor-media-resize,
body.site-community-write .editor-youtube-frame,
body.site-community-write .editor-youtube-card {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 10px 0;
  cursor: grab;
}

body.site-community-write .editor-media-resize.is-selected,
body.site-community-write .editor-youtube-frame.is-selected,
body.site-community-write .editor-youtube-card.is-selected {
  outline: 2px solid rgba(26, 115, 232, 0.72);
  outline-offset: 3px;
  border-radius: 8px;
}

body.site-community-write .editor-media-resize img {
  margin: 0;
}

body.site-community-write .editor-resize-dot {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1a73e8;
  cursor: nwse-resize;
}

body.site-community-write .rich-editor iframe {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  margin: 10px 0;
}

body.site-community-write .editor-youtube-card {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 760px;
  min-height: 96px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #f8fafd;
  color: #202124;
  overflow: hidden;
  text-decoration: none;
}

body.site-community-write .editor-youtube-card img {
  width: 164px;
  height: 96px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}

body.site-community-write .editor-youtube-play {
  position: absolute;
  left: 66px;
  top: 50%;
  width: 34px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 40, 40, 0.86);
  transform: translateY(-50%);
}

body.site-community-write .editor-youtube-play::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

body.site-community-write .editor-youtube-title {
  min-width: 0;
  padding-right: 12px;
  color: #202124;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.4;
}

body.site-community-write .write-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--write-field-border);
  background: transparent;
}

body.site-community-write.site-notice-write .write-actions {
  grid-template-columns: 1fr;
}

body.site-community-write.site-notice-write .write-actions input {
  display: none;
}

body.site-community-write .write-actions .forum-action-btn {
  min-height: 42px;
  border-radius: 7px;
  background: #1a73e8;
  color: #fff;
  box-shadow: none;
}

body.site-community-write .write-actions .forum-action-btn:hover,
body.site-community-write .write-actions .forum-action-btn:focus-visible {
  background: #1765cc;
}

@media (max-width: 940px) {
  body.site-community-write .write-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.site-community-write .forum-head h1 {
    font-size: 1.9rem;
  }

  body.site-community-write .write-fields,
  body.site-community-write .write-actions {
    grid-template-columns: 1fr;
    padding-right: 12px;
    padding-left: 12px;
  }

  body.site-community-write .write-category-field {
    grid-template-columns: 1fr;
  }

  body.site-community-write .editor-toolbar {
    position: relative;
    top: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 10px;
    padding-left: 10px;
  }

  body.site-community-write .editor-color-popover {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 16px;
    left: 14px;
    width: auto;
    max-width: 300px;
    margin: 0 auto;
  }

  body.site-community-write .rich-editor {
    width: calc(100% - 20px);
    min-height: 420px;
    margin-top: 12px;
    padding: 24px 18px;
  }

  body.site-community-write .editor-youtube-card {
    grid-template-columns: 1fr;
  }

  body.site-community-write .editor-youtube-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Community editor controls */
body.site-community-write .editor-toolbar {
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 0;
  max-width: 100%;
}

body.site-community-write .editor-toolbar button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

body.site-community-write .editor-toolbar-group {
  min-width: max-content;
}

body.site-community-write .editor-block-control,
body.site-community-write .editor-font-family-control,
body.site-community-write .editor-line-height-control {
  display: inline-flex;
  align-items: center;
  height: 34px;
}

body.site-community-write .editor-block-control select,
body.site-community-write .editor-font-family-control select,
body.site-community-write .editor-line-height-control select {
  height: 30px;
  min-width: 104px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 6px;
  background: var(--editor-popover-bg);
  color: var(--editor-toolbar-text);
  padding: 0 28px 0 9px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

body.site-community-write .editor-block-control select:focus-visible,
body.site-community-write .editor-font-family-control select:focus-visible,
body.site-community-write .editor-line-height-control select:focus-visible,
body.site-community-write .editor-size-control input:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}

body.site-community-write .editor-symbol-code::before {
  content: "</>";
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 950;
}

body.site-community-write .editor-symbol-highlight::before {
  left: 3px;
  top: 2px;
  width: 12px;
  height: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 1px 1px;
  transform: skew(-10deg);
}

body.site-community-write .editor-symbol-highlight::after {
  left: 1px;
  bottom: 2px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #ffe66d;
}

body.site-community-write .editor-symbol-unlink::before,
body.site-community-write .editor-symbol-unlink::after {
  top: 5px;
  width: 10px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: rotate(-28deg);
}

body.site-community-write .editor-symbol-unlink::before {
  left: 0;
}

body.site-community-write .editor-symbol-unlink::after {
  right: 0;
  box-shadow: 0 0 0 999px transparent;
}

body.site-community-write .editor-symbol-unlink {
  background: linear-gradient(#c5221f 0 0) 50% 50% / 18px 2px no-repeat;
  transform: rotate(-12deg);
}

body.site-community-write .editor-symbol-image::before {
  inset: 3px 1px 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

body.site-community-write .editor-symbol-image::after {
  left: 4px;
  bottom: 4px;
  width: 11px;
  height: 7px;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2px) 8px -4px / 8px 8px no-repeat,
    linear-gradient(135deg, transparent 0 45%, currentColor 46% 56%, transparent 57%) 0 0 / 100% 100% no-repeat;
}

body.site-community-write .editor-symbol-hr::before {
  left: 1px;
  top: 8px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

body.site-community-write .editor-symbol-indent,
body.site-community-write .editor-symbol-outdent {
  background:
    linear-gradient(currentColor 0 0) 8px 3px / 9px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 8px / 9px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 13px / 9px 2px no-repeat;
}

body.site-community-write .editor-symbol-indent::before,
body.site-community-write .editor-symbol-outdent::before {
  left: 1px;
  top: 5px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

body.site-community-write .editor-symbol-indent::before {
  border-left: 6px solid currentColor;
}

body.site-community-write .editor-symbol-outdent::before {
  border-right: 6px solid currentColor;
}

body.site-community-write .rich-editor pre {
  white-space: pre-wrap;
  tab-size: 2;
  margin: 12px 0;
  border: 1px solid var(--editor-doc-border);
  border-radius: 8px;
  background: rgba(15, 23, 27, 0.06);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
  line-height: 1.58;
}

body.site-community-write .rich-editor code {
  border-radius: 4px;
  background: rgba(104, 199, 238, 0.12);
  padding: 0.08em 0.28em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

body.site-community-write .rich-editor pre code {
  background: transparent;
  padding: 0;
}

body.site-community-write .rich-editor mark {
  border-radius: 3px;
  background: #ffe66d;
  color: inherit;
  padding: 0.03em 0.14em;
}

body.site-community-write .rich-editor hr {
  height: 1px;
  margin: 22px 0;
  border: 0;
  background: var(--editor-doc-border);
}

body.site-community-write .rich-editor sub,
body.site-community-write .rich-editor sup {
  font-size: 0.72em;
  line-height: 0;
}

@media (max-width: 720px) {
  body.site-community-write .editor-toolbar {
    gap: 5px 0;
    padding: 7px 8px;
  }

  body.site-community-write .editor-toolbar-group {
    height: auto;
    margin-right: 6px;
    padding-right: 6px;
  }

  body.site-community-write .editor-block-control select {
    min-width: 96px;
  }
}

/* Editor toolbar icon alignment pass */
body.site-community-write .editor-toolbar {
  --editor-tool-size: 34px;
  --editor-tool-icon-size: 20px;
  align-items: center;
  gap: 6px 0;
  padding: 8px 12px;
}

body.site-community-write .editor-toolbar-group {
  align-items: center;
  min-height: 36px;
  height: 36px;
  gap: 3px;
  margin-right: 7px;
  padding-right: 7px;
}

body.site-community-write .editor-toolbar button {
  box-sizing: border-box;
  flex: 0 0 var(--editor-tool-size);
  width: var(--editor-tool-size);
  min-width: var(--editor-tool-size);
  height: var(--editor-tool-size);
  min-height: var(--editor-tool-size);
  line-height: 1;
  vertical-align: middle;
}

body.site-community-write .editor-toolbar button > svg,
body.site-community-write .editor-tool-svg {
  display: block;
  width: var(--editor-tool-icon-size);
  height: var(--editor-tool-icon-size);
  margin: auto;
}

body.site-community-write .editor-icon-label,
body.site-community-write .editor-type-step,
body.site-community-write .editor-color-icon,
body.site-community-write .editor-symbol {
  box-sizing: border-box;
  flex: 0 0 var(--editor-tool-icon-size);
  width: var(--editor-tool-icon-size);
  min-width: var(--editor-tool-icon-size);
  height: var(--editor-tool-icon-size);
  min-height: var(--editor-tool-icon-size);
  margin: auto;
}

body.site-community-write .editor-icon-label,
body.site-community-write .editor-type-step {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: var(--editor-tool-icon-size);
  text-align: center;
}

body.site-community-write .editor-icon-label {
  font-size: 0.92rem;
}

body.site-community-write .editor-icon-label.underline {
  border-bottom: 0;
  padding-bottom: 0;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

body.site-community-write .editor-type-step {
  font-size: 0.76rem;
  letter-spacing: 0;
}

body.site-community-write .editor-type-step.is-large {
  font-size: 0.82rem;
}

body.site-community-write .editor-symbol {
  display: block;
  overflow: hidden;
  background: none;
  color: currentColor;
}

body.site-community-write .editor-symbol::before,
body.site-community-write .editor-symbol::after {
  box-sizing: border-box;
}

body.site-community-write .editor-symbol-code::before {
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  line-height: 1;
}

body.site-community-write .editor-symbol-ul {
  background:
    radial-gradient(circle, currentColor 0 1.6px, transparent 1.7px) 2px 4px / 4px 4px no-repeat,
    radial-gradient(circle, currentColor 0 1.6px, transparent 1.7px) 2px 9px / 4px 4px no-repeat,
    radial-gradient(circle, currentColor 0 1.6px, transparent 1.7px) 2px 14px / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 8px 5px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 10px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 15px / 10px 2px no-repeat;
}

body.site-community-write .editor-symbol-ol {
  background:
    linear-gradient(currentColor 0 0) 8px 5px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 10px / 10px 2px no-repeat,
    linear-gradient(currentColor 0 0) 8px 15px / 10px 2px no-repeat;
}

body.site-community-write .editor-symbol-ol::before {
  content: "1\A2\A3";
  left: 2px;
  top: 2px;
  color: currentColor;
  font-size: 5px;
  font-weight: 950;
  line-height: 5px;
  white-space: pre;
}

body.site-community-write .editor-symbol-ol::after {
  content: none;
}

body.site-community-write .editor-symbol-align {
  background:
    linear-gradient(currentColor 0 0) var(--align-a, 0) 4px / 18px 2px no-repeat,
    linear-gradient(currentColor 0 0) var(--align-b, 0) 9px / 13px 2px no-repeat,
    linear-gradient(currentColor 0 0) var(--align-c, 0) 14px / 16px 2px no-repeat;
}

body.site-community-write .editor-symbol-link::before,
body.site-community-write .editor-symbol-link::after,
body.site-community-write .editor-symbol-unlink::before,
body.site-community-write .editor-symbol-unlink::after {
  top: 7px;
  width: 11px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: rotate(-28deg);
}

body.site-community-write .editor-symbol-link::before,
body.site-community-write .editor-symbol-unlink::before {
  left: 1px;
}

body.site-community-write .editor-symbol-link::after,
body.site-community-write .editor-symbol-unlink::after {
  right: 1px;
}

body.site-community-write .editor-symbol-unlink {
  transform: none;
  background: none;
}

body.site-community-write .editor-symbol-unlink::after {
  box-shadow: none;
}

body.site-community-write .editor-symbol-unlink {
  background: linear-gradient(#c5221f 0 0) 50% 50% / 19px 2px no-repeat;
}

body.site-community-write .editor-symbol-image::before {
  inset: 3px 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

body.site-community-write .editor-symbol-image::after {
  left: 5px;
  right: 4px;
  bottom: 5px;
  height: 7px;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2.1px) 9px -5px / 9px 9px no-repeat,
    linear-gradient(135deg, transparent 0 43%, currentColor 44% 56%, transparent 57%) 0 0 / 100% 100% no-repeat;
}

body.site-community-write .editor-symbol-youtube::before {
  inset: 4px 1px;
  border-radius: 5px;
  background: #ea4335;
}

body.site-community-write .editor-symbol-youtube::after {
  left: 8px;
  top: 7px;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

body.site-community-write .editor-symbol-highlight::before {
  left: 4px;
  top: 2px;
  width: 12px;
  height: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 1px 1px;
  transform: skew(-10deg);
}

body.site-community-write .editor-symbol-highlight::after {
  left: 2px;
  bottom: 3px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #ffe66d;
}

body.site-community-write .editor-symbol-hr::before {
  left: 2px;
  top: 9px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

body.site-community-write .editor-symbol-clear::before {
  left: 3px;
  top: 6px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-20deg);
}

body.site-community-write .editor-symbol-clear::after {
  left: 2px;
  bottom: 2px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #c5221f;
}

body.site-community-write .editor-symbol-indent,
body.site-community-write .editor-symbol-outdent {
  background:
    linear-gradient(currentColor 0 0) 9px 4px / 9px 2px no-repeat,
    linear-gradient(currentColor 0 0) 9px 9px / 9px 2px no-repeat,
    linear-gradient(currentColor 0 0) 9px 14px / 9px 2px no-repeat;
}

body.site-community-write .editor-symbol-indent::before,
body.site-community-write .editor-symbol-outdent::before {
  left: 2px;
  top: 6px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

body.site-community-write .editor-symbol-indent::before {
  border-left: 6px solid currentColor;
}

body.site-community-write .editor-symbol-outdent::before {
  border-right: 6px solid currentColor;
}

body.site-community-write .editor-color-icon {
  display: grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  color: var(--editor-toolbar-accent);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: none;
}

body.site-community-write .editor-color-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Polished color picker palette */
body.site-community-write .editor-color-popover {
  width: min(490px, calc(100vw - 36px));
  gap: 12px;
  border-color: var(--editor-toolbar-divider);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.020)),
    var(--editor-popover-bg);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  padding: 13px;
}

body.site-community-write .editor-color-custom {
  display: grid;
  gap: 10px;
}

body.site-community-write .editor-color-custom > span {
  color: var(--editor-toolbar-text);
  font-size: 0.88rem;
  font-weight: 820;
  line-height: 1;
}

body.site-community-write .editor-color-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.site-community-write .editor-color-popover .editor-color-tool {
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--editor-toolbar-text);
  padding: 0;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);
}

body.site-community-write .editor-color-popover .editor-color-tool:hover,
body.site-community-write .editor-color-popover .editor-color-tool:focus-visible {
  border-color: var(--editor-toolbar-accent);
  background: var(--editor-toolbar-hover-bg);
  color: var(--editor-toolbar-accent);
  transform: translateY(-1px);
}

body.site-community-write .editor-tool-plus,
body.site-community-write .editor-tool-dropper {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

body.site-community-write .editor-tool-plus::before,
body.site-community-write .editor-tool-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

body.site-community-write .editor-tool-plus::before {
  width: 14px;
  height: 2px;
}

body.site-community-write .editor-tool-plus::after {
  width: 2px;
  height: 14px;
}

body.site-community-write .editor-tool-dropper::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 3px 3px;
  transform: rotate(45deg);
}

body.site-community-write .editor-tool-dropper::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

body.site-community-write .editor-color-divider {
  height: 1px;
  background: var(--editor-toolbar-divider);
}

body.site-community-write .editor-color-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

body.site-community-write .editor-color-popover .editor-color-swatch {
  display: grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border-color: transparent;
  border-radius: 999px;
  background: transparent;
  padding: 0;
}

body.site-community-write .editor-color-popover .editor-color-swatch:hover,
body.site-community-write .editor-color-popover .editor-color-swatch:focus-visible,
body.site-community-write .editor-color-popover .editor-color-swatch.is-selected {
  border-color: var(--editor-toolbar-accent);
  background: var(--editor-toolbar-hover-bg);
  box-shadow: 0 0 0 3px rgba(104, 199, 238, 0.13);
}

body.site-community-write .color-dot {
  width: 24px;
  height: 24px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--color-option, #202124);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 1px 3px rgba(0, 0, 0, 0.18);
}

body.site-community-write .editor-color-mode-tabs,
body.site-community-write .editor-color-model-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 4px;
}

body.site-community-write .editor-color-mode-tabs button,
body.site-community-write .editor-color-model-tabs button,
body.site-community-write .editor-theme-card,
body.site-community-write .editor-custom-actions button {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

body.site-community-write .editor-color-mode-tabs button.is-active,
body.site-community-write .editor-color-model-tabs button.is-active {
  border-color: rgba(104, 199, 238, 0.45);
  background: rgba(104, 199, 238, 0.16);
  color: var(--editor-toolbar-accent);
}

body.site-community-write .editor-color-panel.hidden,
body.site-community-write .editor-custom-picker.hidden,
body.site-community-write .editor-theme-section.hidden,
body.site-community-write .editor-color-inputs.hidden {
  display: none;
}

body.site-community-write .editor-color-popover.is-theme-mode .editor-color-custom,
body.site-community-write .editor-color-popover.is-theme-mode .editor-custom-picker,
body.site-community-write .editor-color-popover.is-theme-mode .editor-color-divider,
body.site-community-write .editor-color-popover.is-theme-mode .editor-color-grid {
  display: none;
}

body.site-community-write .editor-color-section-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

body.site-community-write .editor-theme-section {
  display: grid;
  gap: 8px;
}

body.site-community-write .editor-theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.site-community-write .editor-theme-list {
  display: grid;
  gap: 8px;
}

body.site-community-write .editor-theme-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--editor-toolbar-divider);
  background: rgba(255, 255, 255, 0.04);
  color: var(--editor-toolbar-text);
  text-align: left;
}

body.site-community-write .editor-theme-card:hover,
body.site-community-write .editor-theme-card:focus-visible {
  border-color: var(--editor-toolbar-accent);
  background: var(--editor-toolbar-hover-bg);
  color: var(--editor-toolbar-accent);
}

body.site-community-write .editor-theme-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.site-community-write .editor-theme-card-colors {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  height: 28px;
  border-radius: 999px;
}

body.site-community-write .editor-theme-card-colors span {
  background: var(--theme-color);
}

body.site-community-write .editor-custom-picker {
  display: grid;
  gap: 14px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

body.site-community-write .editor-custom-color-field {
  position: relative;
  height: 224px;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--editor-picker-hue, 196) 100% 50%));
  cursor: crosshair;
}

body.site-community-write .editor-custom-field-cursor {
  position: absolute;
  left: var(--editor-picker-s, 56%);
  top: var(--editor-picker-v, 7%);
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

body.site-community-write .editor-custom-control-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

body.site-community-write .editor-custom-preview {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: var(--editor-picker-color, #68c7ee);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.18);
}

body.site-community-write .editor-hue-control {
  display: grid;
  min-width: 0;
}

body.site-community-write .editor-hue-control input {
  appearance: none;
  width: 100%;
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  padding: 0;
}

body.site-community-write .editor-hue-control input::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: hsl(var(--editor-picker-hue, 196) 100% 50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

body.site-community-write .editor-hue-control input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: hsl(var(--editor-picker-hue, 196) 100% 50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

body.site-community-write .editor-color-inputs {
  display: grid;
  grid-template-columns: minmax(108px, 1.35fr) repeat(3, minmax(62px, 1fr));
  gap: 10px;
}

body.site-community-write .editor-color-inputs[data-editor-model-fields="hsl"] {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}

body.site-community-write .editor-color-inputs label {
  display: grid;
  gap: 6px;
  color: var(--editor-toolbar-text);
  font-size: 0.76rem;
  font-weight: 850;
}

body.site-community-write .editor-color-inputs label span {
  color: var(--muted);
}

body.site-community-write .editor-color-inputs input {
  min-height: 42px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 7px;
  background: var(--editor-popover-bg);
  color: var(--editor-toolbar-text);
  padding: 0 10px;
  font-size: 0.96rem;
  font-weight: 780;
}

body.site-community-write .editor-custom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.site-community-write .editor-custom-actions button {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--editor-toolbar-text);
}

body.site-community-write .editor-custom-actions .editor-custom-apply {
  border-color: color-mix(in srgb, var(--accent) 56%, transparent);
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #06110c;
}

body.site-community-write .editor-custom-actions button:hover,
body.site-community-write .editor-custom-actions button:focus-visible {
  transform: none;
}

html[data-theme="light"] body.site-community-write .editor-color-popover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    var(--editor-popover-bg);
  box-shadow:
    0 22px 48px rgba(31, 42, 36, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

html[data-theme="light"] body.site-community-write .editor-color-popover .editor-color-tool {
  background: rgba(31, 42, 36, 0.035);
}

html[data-theme="light"] body.site-community-write .color-dot {
  border-color: rgba(31, 42, 36, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    0 1px 2px rgba(31, 42, 36, 0.12);
}

html[data-theme="light"] body.site-community-write .editor-color-mode-tabs,
html[data-theme="light"] body.site-community-write .editor-color-model-tabs,
html[data-theme="light"] body.site-community-write .editor-custom-picker,
html[data-theme="light"] body.site-community-write .editor-theme-card {
  background: rgba(31, 42, 36, 0.035);
}

html[data-theme="light"] body.site-community-write .editor-color-inputs input {
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 760px) {
  body.site-community-write .editor-color-popover {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 16px;
    left: 14px;
    width: auto;
    max-width: none;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  body.site-community-write .editor-color-popover {
    left: 14px;
    width: min(332px, calc(100vw - 28px));
  }

  body.site-community-write .editor-color-grid {
    gap: 5px;
  }

  body.site-community-write .editor-color-popover .editor-color-swatch {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
  }

  body.site-community-write .color-dot {
    width: 22px;
    height: 22px;
  }

  body.site-community-write .editor-custom-color-field {
    height: 176px;
  }

  body.site-community-write .editor-color-inputs,
  body.site-community-write .editor-color-inputs[data-editor-model-fields="hsl"] {
    grid-template-columns: 1fr 1fr;
  }

  body.site-community-write .editor-color-inputs label:first-child {
    grid-column: 1 / -1;
  }

  body.site-community-write .editor-theme-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

body.site-community-write .editor-block-control,
body.site-community-write .editor-font-family-control,
body.site-community-write .editor-line-height-control,
body.site-community-write .editor-size-control {
  height: var(--editor-tool-size);
  align-items: center;
}

body.site-community-write .editor-block-control select,
body.site-community-write .editor-font-family-control select,
body.site-community-write .editor-line-height-control select,
body.site-community-write .editor-size-control input {
  height: 30px;
}

@media (max-width: 720px) {
  body.site-community-write .editor-toolbar {
    gap: 6px 0;
    padding: 8px;
  }

  body.site-community-write .editor-toolbar-group {
    min-height: 36px;
    height: 36px;
    margin-right: 6px;
    padding-right: 6px;
  }
}

/* Modern posting composer */
body.site-community-write {
  --write-shell-max: 1120px;
  --write-card-bg: rgba(11, 19, 22, 0.78);
  --write-card-line: rgba(198, 233, 221, 0.14);
  --write-panel-glow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --write-input-bg-modern: rgba(255, 255, 255, 0.045);
}

html[data-theme="light"] body.site-community-write {
  --write-card-bg: rgba(255, 255, 255, 0.82);
  --write-card-line: rgba(35, 62, 52, 0.12);
  --write-panel-glow: 0 24px 54px rgba(41, 63, 53, 0.14);
  --write-input-bg-modern: rgba(246, 250, 248, 0.92);
}

body.site-community-write .forum-shell {
  width: min(calc(100% - 16px), var(--write-shell-max));
  padding: calc(var(--nav-height) + 8px) 8px 10px;
}

body.site-community-write .forum-head {
  display: none;
  margin-bottom: 0;
}

body.site-community-write .forum-head h1 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

body.site-community-write .write-layout {
  gap: 0;
}

body.site-community-write .editor-board {
  display: flex;
  flex-direction: column;
  min-height: max(0px, calc(100svh - var(--nav-height, 74px) - 18px));
  overflow: visible;
  border: 1px solid var(--write-card-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 220px),
    var(--write-card-bg);
  box-shadow: var(--write-panel-glow);
}

body.site-community-write .write-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--write-card-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 15, 18, 0.56);
  padding: 7px 10px;
}

html[data-theme="light"] body.site-community-write .write-studio-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 248, 0.64)),
    rgba(255, 255, 255, 0.72);
}

body.site-community-write .write-title-row {
  min-height: 0;
  padding: 0;
}

body.site-community-write .post-back-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--write-card-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

body.site-community-write .post-title-copy h2 {
  display: none;
}

body.site-community-write .write-status-strip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

body.site-community-write .write-status-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--write-card-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0 10px;
}

body.site-community-write .write-status-pill.is-dirty {
  border-color: rgba(241, 186, 99, 0.42);
  background: rgba(241, 186, 99, 0.10);
  color: var(--warning);
}

body.site-community-write .write-status-pill.is-clean {
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-strong);
}

body.site-community-write .write-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 14px 8px;
}

body.site-community-write .write-title-field {
  display: block;
  min-width: 0;
}

body.site-community-write #post-title {
  width: 100%;
  min-height: auto;
  border: 0;
  border-bottom: 1px solid var(--write-card-line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 8px;
  color: var(--text-strong);
  font-size: clamp(1.25rem, 2.4vw, 2.05rem);
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: 0;
}

body.site-community-write #post-title:hover,
body.site-community-write #post-title:focus {
  background: transparent;
  border-color: var(--line-strong);
  box-shadow: none;
}

body.site-community-write #post-title::placeholder {
  color: rgba(168, 186, 180, 0.42);
}

body.site-community-write .write-meta-grid {
  display: grid;
  grid-template-columns: minmax(118px, 150px) minmax(132px, 172px) minmax(280px, 1fr);
  gap: 10px;
}

body.site-community-write .write-category-field,
body.site-community-write .write-tags-field {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--write-card-line);
  border-radius: 8px;
  background: var(--write-input-bg-modern);
  padding: 0 12px;
  cursor: pointer;
  overflow: visible;
  transition:
    transform var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease);
}

body.site-community-write .write-category-field > span,
body.site-community-write .write-tags-field > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

body.site-community-write .write-category-select,
body.site-community-write .write-tags-field input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--write-field-text);
  font-size: 0.9rem;
  font-weight: 850;
  outline: none;
}

body.site-community-write .write-category-select:hover,
body.site-community-write .write-category-select:focus,
body.site-community-write .write-category-select:focus-visible {
  border: 0;
  background-color: transparent;
  box-shadow: none;
  outline: none;
}

body.site-community-write .write-tags-field input {
  padding: 0;
}

body.site-community-write .write-category-field:hover,
body.site-community-write .write-category-field:focus-within,
body.site-community-write .write-tags-field:hover,
body.site-community-write .write-tags-field:focus-within {
  border-color: var(--line-strong);
  background: rgba(139, 191, 152, 0.095);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

body.site-community-write .write-category-field:hover .write-category-select,
body.site-community-write .write-category-field:focus-within .write-category-select {
  color: var(--text-strong);
}

body.site-community-write .write-category-select-wrap.has-mw-select::after {
  display: none;
}

body.site-community-write .write-category-field .mw-select-trigger {
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: var(--write-field-text);
  font-size: 0.9rem;
  font-weight: 850;
  transform: none;
}

body.site-community-write .write-category-field .mw-select-trigger:hover,
body.site-community-write .write-category-field .mw-select-trigger:focus-visible,
body.site-community-write .write-category-field .mw-select.is-open .mw-select-trigger {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-strong);
  transform: none;
}

body.site-community-write .write-category-field .mw-select-menu {
  min-width: 160px;
}

body.site-community-write.site-notice-write .write-tags-field {
  display: none;
}

body.site-community-write .editor-toolbar {
  top: var(--nav-height);
  z-index: 25;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--write-card-line);
  border-bottom: 1px solid var(--write-card-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(10, 17, 20, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  padding: 6px 8px;
  scrollbar-width: none;
}

body.site-community-write .editor-toolbar::-webkit-scrollbar {
  display: none;
}

html[data-theme="light"] body.site-community-write .editor-toolbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(246, 250, 248, 0.86)),
    rgba(255, 255, 255, 0.94);
}

body.site-community-write .editor-toolbar-group {
  height: 38px;
  min-height: 38px;
  gap: 4px;
  margin-right: 0;
  border-right: 1px solid var(--editor-toolbar-divider);
  padding: 0 9px 0 0;
}

body.site-community-write .editor-toolbar-group:last-child {
  border-right: 0;
  padding-right: 0;
}

body.site-community-write .editor-toolbar button {
  --editor-tool-size: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

body.site-community-write .editor-toolbar .editor-tool-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site-community-write .editor-toolbar button:hover,
body.site-community-write .editor-toolbar button:focus-visible,
body.site-community-write .editor-toolbar button.is-active {
  transform: translateY(-1px);
}

body.site-community-write .editor-block-control select,
body.site-community-write .editor-font-family-control select,
body.site-community-write .editor-line-height-control select,
body.site-community-write .editor-size-control input {
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

body.site-community-write .editor-block-control select {
  min-width: 118px;
}

body.site-community-write .editor-block-control .mw-select {
  min-width: 118px;
}

body.site-community-write .editor-font-family-control .mw-select {
  min-width: 122px;
}

body.site-community-write .editor-line-height-control .mw-select {
  min-width: 92px;
}

body.site-community-write .editor-block-control .mw-select-trigger,
body.site-community-write .editor-font-family-control .mw-select-trigger,
body.site-community-write .editor-line-height-control .mw-select-trigger {
  min-height: 32px;
  height: 32px;
  border-color: var(--editor-toolbar-divider);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 10px;
  color: var(--editor-toolbar-text);
  font-size: 0.82rem;
  font-weight: 800;
}

body.site-community-write .editor-block-control .mw-select-menu {
  min-width: 148px;
}

body.site-community-write .rich-editor {
  flex: 1 0 auto;
  width: calc(100% - 28px);
  min-height: clamp(150px, 28svh, 460px);
  overflow-y: visible;
  margin: 0 14px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 0 16px;
  font-size: 1.02rem;
}

body.site-community-write .rich-editor:focus {
  box-shadow: none;
}

body.site-community-write .rich-editor:empty::before {
  color: rgba(168, 186, 180, 0.58);
}

body.site-community-write .rich-editor h2 {
  font-size: 1.65rem;
}

body.site-community-write .rich-editor h3 {
  font-size: 1.25rem;
}

body.site-community-write .rich-editor blockquote {
  border-left-color: var(--quote-accent, #8bbf98);
  background: var(--quote-bg, rgba(148, 163, 184, 0.08));
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
}

body.site-community-write .rich-editor pre {
  border-radius: 8px;
  text-align: left !important;
}

body.site-community-write .rich-editor pre,
body.site-community-write .rich-editor pre * {
  text-align: left !important;
}

body.site-community-write .rich-editor code {
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
  line-height: inherit;
}

body.site-community-write .write-actions {
  position: static;
  bottom: auto;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  gap: 10px;
  border-top: 1px solid var(--write-card-line);
  background:
    linear-gradient(180deg, rgba(10, 17, 20, 0.78), rgba(10, 17, 20, 0.96));
  padding: 10px 14px;
  backdrop-filter: none;
}

html[data-theme="light"] body.site-community-write .write-actions {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.96));
}

body.site-community-write .write-actions .forum-action-btn {
  min-width: 112px;
  min-height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #07120d;
  font-weight: 950;
}

body.site-community-write .write-actions input {
  flex: 1 1 260px;
  max-width: 420px;
}

body.site-community-write .write-actions .forum-action-btn:hover,
body.site-community-write .write-actions .forum-action-btn:focus-visible {
  background: linear-gradient(180deg, #a7f6ba, var(--accent));
}

body.site-community-write .write-actions .forum-action-btn.secondary {
  border: 1px solid var(--write-card-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

body.site-community-write .write-actions .forum-action-btn.secondary:hover,
body.site-community-write .write-actions .forum-action-btn.secondary:focus-visible {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text-strong);
}

body.site-community-write #post-write-message {
  margin: 0;
  padding: 0 clamp(18px, 4vw, 46px) 18px;
}

@media (max-width: 900px) {
  body.site-community-write .write-studio-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.site-community-write .write-status-strip {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  body.site-community-write .write-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.site-community-write .forum-shell {
    width: min(calc(100% - 16px), var(--write-shell-max));
  }

  body.site-community-write .write-fields {
    padding: 18px 14px 12px;
  }

  body.site-community-write #post-title {
    font-size: clamp(1.5rem, 8vw, 2.35rem);
  }

  body.site-community-write .editor-toolbar {
    top: 0;
    padding: 8px;
  }

  body.site-community-write .editor-toolbar-group {
    height: 38px;
    min-height: 38px;
  }

  body.site-community-write .rich-editor {
    width: calc(100% - 6px);
    min-height: 440px;
    margin-top: 6px;
    padding: 14px 10px 24px;
  }

  body.site-community-write .write-actions {
    padding: 12px 14px;
  }

  body.site-community-write .write-actions .forum-action-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

body.site-community-write .rich-editor::selection,
body.site-community-write .rich-editor *::selection,
body.site-community-write #post-title::selection,
body.site-community-write #post-tags::selection {
  background: rgba(148, 163, 184, 0.42);
  color: var(--text-strong);
}

body.site-community-write .rich-editor::-moz-selection,
body.site-community-write .rich-editor *::-moz-selection,
body.site-community-write #post-title::-moz-selection,
body.site-community-write #post-tags::-moz-selection {
  background: rgba(148, 163, 184, 0.42);
  color: var(--text-strong);
}

/* Flat editor surface and tailored controls */
body.site-community-write .editor-board {
  background: var(--write-card-bg) !important;
  background-image: none !important;
}

body.site-community-write .write-studio-header,
body.site-community-write .editor-toolbar,
body.site-community-write .write-actions {
  background: rgba(10, 17, 20, 0.94) !important;
  background-image: none !important;
}

html[data-theme="light"] body.site-community-write .write-studio-header,
html[data-theme="light"] body.site-community-write .editor-toolbar,
html[data-theme="light"] body.site-community-write .write-actions {
  background: rgba(255, 255, 255, 0.94) !important;
  background-image: none !important;
}

body.site-community-write .write-actions .forum-action-btn {
  background: var(--accent) !important;
  background-image: none !important;
}

body.site-community-write .write-actions .forum-action-btn:hover,
body.site-community-write .write-actions .forum-action-btn:focus-visible {
  background: var(--accent-strong) !important;
  background-image: none !important;
}

body.site-community-write .write-actions .forum-action-btn.secondary,
body.site-community-write .write-actions .forum-action-btn.secondary:hover,
body.site-community-write .write-actions .forum-action-btn.secondary:focus-visible {
  background-image: none !important;
}

body.site-community-write .editor-toolbar button {
  border-color: transparent;
  background: transparent !important;
  box-shadow: none;
}

body.site-community-write .editor-toolbar button:hover,
body.site-community-write .editor-toolbar button:focus-visible,
body.site-community-write .editor-toolbar button.is-active {
  border-color: var(--write-card-line);
  background: transparent !important;
  color: var(--text-strong);
  box-shadow: none;
}

body.site-community-write .editor-size-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
}

body.site-community-write .editor-size-trigger {
  min-width: 54px;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 8px;
  background: transparent !important;
  color: var(--editor-toolbar-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
}

body.site-community-write .editor-size-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

body.site-community-write .editor-size-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: repeat(4, 44px);
  gap: 4px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 8px;
  background: rgba(10, 17, 20, 0.98);
  padding: 6px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

body.site-community-write .editor-size-menu.hidden {
  display: none;
}

html[data-theme="light"] body.site-community-write .editor-size-menu {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(24, 48, 38, 0.14);
}

body.site-community-write .editor-size-option {
  width: 44px;
  height: 30px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent !important;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

body.site-community-write .editor-size-option:hover,
body.site-community-write .editor-size-option:focus-visible,
body.site-community-write .editor-size-option.is-active {
  border-color: var(--line-strong);
  color: var(--text-strong);
}

body.site-community-write .editor-size-control input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

body.site-community-write .editor-size-control input[type="number"]::-webkit-outer-spin-button,
body.site-community-write .editor-size-control input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* Compact metadata row and fixed two-line editor toolbar */
body.site-community-write .write-meta-grid {
  grid-template-columns: minmax(142px, 178px) minmax(154px, 192px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

body.site-community-write .write-category-field,
body.site-community-write .write-tags-field {
  height: 46px;
  min-height: 46px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 0 12px;
}

body.site-community-write .write-category-field > span,
body.site-community-write .write-tags-field > span {
  white-space: nowrap;
}

body.site-community-write .write-category-select-wrap,
body.site-community-write .write-category-field .mw-select,
body.site-community-write select#post-category + .mw-select,
body.site-community-write select#post-visibility + .mw-select {
  width: 100%;
  min-width: 0;
}

body.site-community-write .write-category-field .mw-select-trigger,
body.site-community-write select#post-category + .mw-select .mw-select-trigger,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
}

body.site-community-write .write-tags-field input {
  min-width: 0;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, auto) auto;
  grid-template-areas:
    "run font size line style color"
    "list align insert insert insert insert";
  align-items: center;
  gap: 6px 8px;
  min-height: 86px;
  overflow: visible;
  padding: 7px 10px;
  scrollbar-width: none;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs::-webkit-scrollbar {
  display: none;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group {
  min-width: 0;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 8px 0 0;
  border-right: 1px solid var(--editor-toolbar-divider);
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(1) {
  grid-area: run;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(2) {
  grid-area: font;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(3) {
  grid-area: size;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(4) {
  grid-area: line;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(5) {
  grid-area: style;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(6) {
  grid-area: color;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(7) {
  grid-area: list;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(8) {
  grid-area: align;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(9) {
  grid-area: insert;
  border-right: 0;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(5),
body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(9) {
  flex-wrap: nowrap;
  justify-self: start;
}

@media (max-width: 1180px) {
  body.site-community-write .editor-toolbar.editor-toolbar-docs {
    grid-template-columns: auto auto auto minmax(0, 1fr);
    grid-template-areas:
      "run font size line"
      "style color list align"
      "insert insert insert insert";
    min-height: 128px;
  }

  body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(4),
  body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(8) {
    border-right: 0;
  }
}

@media (max-width: 820px) {
  body.site-community-write .write-meta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.site-community-write .write-tags-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  body.site-community-write .write-meta-grid {
    grid-template-columns: 1fr;
  }

  body.site-community-write .write-tags-field {
    grid-column: auto;
  }

  body.site-community-write .editor-toolbar.editor-toolbar-docs {
    display: flex;
    flex-wrap: wrap;
    min-height: 0;
  }
}

/* Layout and editor icon polish */
body.site-community-write .write-layout {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

body.site-community-write .editor-board {
  width: 100%;
}

body.site-community-write .write-studio-header,
body.site-community-write .write-title-row,
body.site-community-write .write-status-strip,
body.site-community-write .write-fields,
body.site-community-write .write-meta-grid {
  align-items: center;
}

body.site-community-write .write-title-row {
  min-height: 42px;
}

body.site-community-write .write-meta-grid {
  min-width: 0;
}

body.site-community-write .write-category-field,
body.site-community-write .write-tags-field {
  display: grid;
  align-items: center;
  min-width: 0;
}

body.site-community-write .write-category-field > span,
body.site-community-write .write-tags-field > span {
  display: inline-flex;
  align-items: center;
  min-height: 100%;
  line-height: 1;
}

body.site-community-write .write-category-select,
body.site-community-write .write-tags-field input,
body.site-community-write #post-title {
  display: block;
  min-width: 0;
  line-height: 1.2;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs {
  align-items: center;
  justify-content: start;
  gap: 8px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 36px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(9) {
  flex-wrap: wrap;
  row-gap: 4px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group > button,
body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group > .editor-size-control > button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  line-height: 0;
  text-align: center;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group > button > :is(svg, span),
body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group > .editor-size-control > button > :is(svg, span) {
  grid-area: 1 / 1;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs .editor-size-trigger {
  display: inline-flex;
  width: auto;
  min-width: 54px;
  gap: 0;
  padding: 0 10px;
  line-height: 1;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs .editor-size-trigger > span {
  grid-area: auto;
}

body.site-community-write .editor-toolbar .editor-tool-svg {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site-community-write .editor-toolbar .editor-tool-youtube {
  width: 22px;
  height: 22px;
}

body.site-community-write .editor-toolbar .editor-youtube-play-path {
  fill: currentColor;
  stroke: none;
}

body.site-community-write .editor-toolbar .editor-symbol {
  display: inline-grid;
  place-items: center;
}

body.site-community-write .editor-toolbar :is(.editor-icon-label, .editor-type-step) {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  line-height: 1;
}

body.site-community-write .editor-size-control,
body.site-community-write .editor-block-control,
body.site-community-write .editor-font-family-control,
body.site-community-write .editor-line-height-control {
  align-self: center;
}

/* Font-size picker */
body.site-community-write .editor-size-control {
  position: relative;
  height: 36px;
}

body.site-community-write .editor-size-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 58px !important;
  min-width: 58px !important;
  height: 34px !important;
  min-height: 34px !important;
  border: 1px solid var(--editor-toolbar-divider) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: var(--editor-toolbar-text);
  padding: 0 7px !important;
  cursor: text;
}

body.site-community-write .editor-size-trigger::after {
  content: none !important;
}

body.site-community-write .editor-size-trigger:hover,
body.site-community-write .editor-size-trigger:focus-within {
  border-color: var(--line-strong) !important;
  color: var(--text-strong);
}

body.site-community-write .editor-size-display {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 30px !important;
  height: 28px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: currentColor !important;
  padding: 0 !important;
  font: inherit;
  font-size: 0.86rem !important;
  font-weight: 850;
  line-height: 1;
  text-align: left;
  box-shadow: none !important;
  outline: none;
}

body.site-community-write .editor-size-caret {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.82;
  transform: translateY(-2px) rotate(45deg);
}

body.site-community-write .editor-size-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 320;
  display: block;
  width: 92px;
  max-height: min(430px, calc(100vh - 120px));
  overflow-y: auto;
  border: 1px solid rgba(203, 226, 218, 0.28);
  border-radius: 7px;
  background: #2e2f2f;
  padding: 4px 0;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 241, 238, 0.48) rgba(255, 255, 255, 0.08);
}

body.site-community-write .editor-size-menu.hidden {
  display: none;
}

body.site-community-write .editor-size-list {
  display: grid;
  gap: 0;
}

body.site-community-write .editor-size-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100% !important;
  height: 31px;
  min-height: 31px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f2f7f4;
  padding: 0 17px !important;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}

body.site-community-write .editor-size-option:hover,
body.site-community-write .editor-size-option:focus-visible,
body.site-community-write .editor-size-option.is-active {
  background: rgba(255, 255, 255, 0.13) !important;
  color: #ffffff;
  outline: none;
}

body.site-community-write .editor-size-custom {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  border-top: 1px solid rgba(232, 241, 238, 0.14);
  padding: 8px 8px 6px;
  color: rgba(242, 247, 244, 0.78);
  font-size: 0.72rem;
  font-weight: 750;
}

body.site-community-write .editor-size-custom input {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  border: 1px solid rgba(203, 226, 218, 0.24) !important;
  border-radius: 5px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
  padding: 0 7px !important;
  font-size: 0.86rem !important;
  font-weight: 780;
  text-align: left;
}

body.site-community-write .editor-size-custom input:focus {
  border-color: rgba(203, 226, 218, 0.56) !important;
  outline: none;
}

html[data-theme="light"] body.site-community-write .editor-size-trigger {
  background: rgba(21, 38, 32, 0.04) !important;
}

html[data-theme="light"] body.site-community-write .editor-size-menu {
  border-color: rgba(35, 62, 52, 0.18);
  background: #ffffff;
  box-shadow: 0 16px 28px rgba(24, 48, 38, 0.14);
  scrollbar-color: rgba(42, 66, 58, 0.42) rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] body.site-community-write .editor-size-option {
  color: #17231f;
}

html[data-theme="light"] body.site-community-write .editor-size-option:hover,
html[data-theme="light"] body.site-community-write .editor-size-option:focus-visible,
html[data-theme="light"] body.site-community-write .editor-size-option.is-active {
  background: rgba(31, 52, 44, 0.1) !important;
  color: #0d1713;
}

html[data-theme="light"] body.site-community-write .editor-size-custom {
  border-top-color: rgba(35, 62, 52, 0.12);
  color: rgba(23, 35, 31, 0.68);
}

html[data-theme="light"] body.site-community-write .editor-size-custom input {
  border-color: rgba(35, 62, 52, 0.16) !important;
  background: rgba(21, 38, 32, 0.04) !important;
  color: #17231f !important;
}

/* Line-height picker */
body.site-community-write .editor-line-height-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
}

body.site-community-write .editor-line-height-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 62px !important;
  min-width: 62px !important;
  height: 34px !important;
  min-height: 34px !important;
  border: 1px solid var(--editor-toolbar-divider) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--editor-toolbar-text);
  padding: 0 8px !important;
}

body.site-community-write .editor-line-height-trigger svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site-community-write .editor-line-height-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

body.site-community-write .editor-line-height-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 320;
  display: grid;
  width: 172px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 0;
  background: #2f3030;
  color: #fff;
  padding: 0;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}

body.site-community-write .editor-line-height-menu.hidden {
  display: none;
}

body.site-community-write .editor-line-height-menu button {
  position: relative;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff;
  padding: 0 14px 0 42px !important;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}

body.site-community-write .editor-line-height-menu button:hover,
body.site-community-write .editor-line-height-menu button:focus-visible,
body.site-community-write .editor-line-height-menu button.is-active {
  background: #3a3b3b !important;
  color: #fff;
  transform: none !important;
}

body.site-community-write .editor-line-height-menu button.is-active::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 12px;
  height: 7px;
  border-left: 3px solid #54d46f;
  border-bottom: 3px solid #54d46f;
  transform: translateY(-64%) rotate(-45deg);
}

body.site-community-write .editor-line-height-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 9px 10px 10px 14px;
}

body.site-community-write .editor-line-height-custom span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  white-space: nowrap;
}

body.site-community-write .editor-line-height-custom input {
  width: 58px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

body.site-community-write .editor-line-height-custom input:focus {
  border-color: var(--editor-toolbar-accent);
  outline: none;
}

html[data-theme="light"] body.site-community-write .editor-line-height-menu {
  border-color: #d0d7de;
  background: #ffffff;
  color: #17211d;
  box-shadow: 0 16px 30px rgba(24, 48, 38, 0.14);
}

html[data-theme="light"] body.site-community-write .editor-line-height-menu button,
html[data-theme="light"] body.site-community-write .editor-line-height-custom span {
  color: #17211d;
}

html[data-theme="light"] body.site-community-write .editor-line-height-menu button:hover,
html[data-theme="light"] body.site-community-write .editor-line-height-menu button:focus-visible,
html[data-theme="light"] body.site-community-write .editor-line-height-menu button.is-active {
  background: #eef3f0 !important;
  color: #17211d;
}

html[data-theme="light"] body.site-community-write .editor-line-height-custom {
  border-top-color: rgba(31, 42, 36, 0.12);
}

html[data-theme="light"] body.site-community-write .editor-line-height-custom input {
  border-color: rgba(31, 42, 36, 0.18);
  background: rgba(31, 42, 36, 0.04);
  color: #17211d;
}

@keyframes editorControlMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.site-community-write .editor-font-family-control .mw-select-trigger,
body.site-community-write .editor-size-trigger,
body.site-community-write .editor-line-height-trigger {
  height: 34px !important;
  min-height: 34px !important;
  border: 1px solid var(--editor-toolbar-divider) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.052) !important;
  color: var(--editor-toolbar-text) !important;
  box-shadow: none !important;
  transition:
    border-color var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease),
    transform var(--motion-fast) var(--ease);
}

body.site-community-write .editor-font-family-control .mw-select-trigger {
  min-width: 126px;
  padding: 0 30px 0 11px !important;
}

body.site-community-write .editor-size-trigger {
  min-width: 66px;
}

body.site-community-write .editor-line-height-trigger {
  min-width: 66px !important;
  width: 66px !important;
}

body.site-community-write .editor-font-family-control .mw-select-trigger:hover,
body.site-community-write .editor-font-family-control .mw-select-trigger:focus-visible,
body.site-community-write .editor-font-family-control .mw-select.is-open .mw-select-trigger,
body.site-community-write .editor-size-trigger:hover,
body.site-community-write .editor-size-trigger:focus-within,
body.site-community-write .editor-line-height-trigger:hover,
body.site-community-write .editor-line-height-trigger:focus-visible,
body.site-community-write .editor-line-height-trigger[aria-expanded="true"] {
  border-color: var(--editor-toolbar-active-border) !important;
  background: var(--editor-toolbar-hover-bg) !important;
  color: var(--editor-toolbar-accent) !important;
  transform: translateY(-1px);
}

body.site-community-write .editor-font-family-control .mw-select-menu,
body.site-community-write .editor-size-menu,
body.site-community-write .editor-line-height-menu {
  width: max-content;
  min-width: 126px;
  max-height: min(360px, calc(100vh - 120px));
  overflow-y: auto;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    var(--editor-popover-bg);
  color: var(--editor-toolbar-text);
  padding: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
  animation: editorControlMenuIn 0.16s ease-out;
  transform-origin: top left;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 241, 238, 0.44) rgba(255, 255, 255, 0.06);
}

body.site-community-write .editor-size-menu {
  display: grid;
  min-width: 88px;
}

body.site-community-write .editor-line-height-menu {
  display: grid;
  min-width: 156px;
  gap: 3px;
}

body.site-community-write .editor-size-menu.hidden,
body.site-community-write .editor-line-height-menu.hidden {
  display: none !important;
}

body.site-community-write .editor-size-list {
  display: grid;
  gap: 3px;
}

body.site-community-write .editor-size-option,
body.site-community-write .editor-line-height-menu button {
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  height: 34px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--editor-toolbar-text) !important;
  padding: 0 12px !important;
  font-size: 0.86rem !important;
  font-weight: 850 !important;
  text-align: left;
  transition:
    border-color var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease),
    transform var(--motion-fast) var(--ease);
}

body.site-community-write .editor-size-option:hover,
body.site-community-write .editor-size-option:focus-visible,
body.site-community-write .editor-size-option.is-active,
body.site-community-write .editor-line-height-menu button:hover,
body.site-community-write .editor-line-height-menu button:focus-visible,
body.site-community-write .editor-line-height-menu button.is-active {
  border-color: rgba(104, 199, 238, 0.34) !important;
  background: rgba(104, 199, 238, 0.14) !important;
  color: var(--editor-toolbar-accent) !important;
  outline: none;
  transform: translateX(2px) !important;
}

body.site-community-write .editor-line-height-menu button.is-active::before {
  content: none;
}

body.site-community-write .editor-size-custom {
  display: none !important;
}

body.site-community-write .editor-line-height-custom {
  grid-template-columns: minmax(0, 1fr) 64px;
  margin-top: 4px;
  border-top: 1px solid var(--editor-toolbar-divider);
  padding: 10px 4px 2px;
}

body.site-community-write .editor-line-height-custom span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

body.site-community-write .editor-line-height-custom input {
  width: 64px;
  min-height: 34px;
  border: 1px solid var(--editor-toolbar-divider);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.052);
  color: var(--editor-toolbar-text);
  padding: 0 8px;
  font-size: 0.86rem;
  font-weight: 850;
  text-align: center;
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}

body.site-community-write .editor-line-height-custom input:focus {
  border-color: var(--editor-toolbar-active-border);
  background: var(--editor-toolbar-hover-bg);
  box-shadow: 0 0 0 3px rgba(104, 199, 238, 0.12);
  outline: none;
}

html[data-theme="light"] body.site-community-write .editor-font-family-control .mw-select-trigger,
html[data-theme="light"] body.site-community-write .editor-size-trigger,
html[data-theme="light"] body.site-community-write .editor-line-height-trigger,
html[data-theme="light"] body.site-community-write .editor-line-height-custom input {
  background: rgba(31, 42, 36, 0.035) !important;
}

html[data-theme="light"] body.site-community-write .editor-font-family-control .mw-select-menu,
html[data-theme="light"] body.site-community-write .editor-size-menu,
html[data-theme="light"] body.site-community-write .editor-line-height-menu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)),
    var(--editor-popover-bg);
  box-shadow: 0 18px 34px rgba(31, 42, 36, 0.14);
  scrollbar-color: rgba(42, 66, 58, 0.36) rgba(0, 0, 0, 0.05);
}

/* Final write header and metadata select alignment */
body.site-community-write .write-studio-header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start !important;
  gap: 12px;
}

body.site-community-write .write-studio-header .write-title-row {
  grid-column: 1;
  width: auto !important;
  min-width: 0;
  justify-self: start;
}

body.site-community-write .write-studio-header .write-status-strip {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  width: auto;
  max-width: min(52vw, 420px);
  margin: 14px 18px 0 12px;
  overflow: visible;
}

body.site-community-write .write-category-field {
  position: relative;
  overflow: visible;
  cursor: pointer;
}

body.site-community-write .write-category-field > span {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

body.site-community-write .write-category-select-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

body.site-community-write .write-category-select-wrap .write-category-select {
  pointer-events: none;
}

body.site-community-write .write-category-select-wrap.has-mw-select .mw-select {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

body.site-community-write .write-category-field .mw-select-trigger,
body.site-community-write select#post-category + .mw-select .mw-select-trigger,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger {
  width: 100%;
  height: 100%;
  min-height: 44px;
  border: 0;
  background: transparent !important;
  padding: 0 40px 0 64px;
}

body.site-community-write .write-category-field .mw-select-trigger::after,
body.site-community-write select#post-category + .mw-select .mw-select-trigger::after,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger::after {
  right: 14px;
}

body.site-community-write select#post-category + .mw-select .mw-select-menu,
body.site-community-write select#post-visibility + .mw-select .mw-select-menu {
  overflow-y: visible;
}

@media (max-width: 900px) {
  body.site-community-write .write-studio-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body.site-community-write .write-studio-header .write-status-strip {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    margin: 0 18px 12px;
  }
}

@media (max-width: 1180px) {
  body.site-community-write .editor-toolbar.editor-toolbar-docs {
    justify-content: start;
  }
}

@media (max-width: 620px) {
  body.site-community-write .write-studio-header,
  body.site-community-write .write-fields,
  body.site-community-write .write-actions {
    align-items: stretch;
  }

  body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group {
    border-right: 0;
  }
}

/* Final editor control sizing and custom color modal polish */
body.site-community-write .write-meta-grid {
  grid-template-columns: minmax(116px, 138px) minmax(142px, 168px) minmax(0, 1fr) !important;
  gap: 10px !important;
}

body.site-community-write .write-category-field,
body.site-community-write .write-tags-field {
  padding-right: 10px !important;
  padding-left: 10px !important;
}

body.site-community-write .write-category-field .mw-select-trigger,
body.site-community-write select#post-category + .mw-select .mw-select-trigger,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger,
body.site-community-write .editor-font-family-control .mw-select-trigger {
  position: relative;
  justify-content: flex-start !important;
  padding-right: 28px !important;
}

body.site-community-write .write-category-field .mw-select-trigger::after,
body.site-community-write select#post-category + .mw-select .mw-select-trigger::after,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger::after,
body.site-community-write .editor-font-family-control .mw-select-trigger::after {
  position: absolute !important;
  right: 10px !important;
  flex: 0 0 auto;
  margin-left: 0 !important;
}

body.site-community-write .write-category-field .mw-select-label,
body.site-community-write .editor-font-family-control .mw-select-label {
  overflow: hidden;
  padding-right: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.site-community-write .editor-size-menu {
  width: 66px !important;
  min-width: 66px !important;
  max-width: 66px !important;
  overflow-y: visible !important;
  padding: 4px !important;
  scrollbar-width: none !important;
}

body.site-community-write .editor-size-menu::-webkit-scrollbar {
  display: none;
}

body.site-community-write .editor-size-option {
  justify-content: center !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  text-align: center !important;
}

body.site-community-write .editor-color-popover.has-custom-picker .editor-custom-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9400;
  width: min(490px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  overflow: auto;
  border-color: rgba(203, 226, 218, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.022)),
    var(--editor-popover-bg);
  padding: 18px;
  transform: translate(-50%, -50%);
}

body.site-community-write .editor-color-popover.has-custom-picker .editor-custom-color-field {
  height: 224px;
  touch-action: none;
}

html[data-theme="light"] body.site-community-write .editor-color-popover.has-custom-picker .editor-custom-picker {
  border-color: rgba(35, 62, 52, 0.16);
  background: #ffffff;
}

body.site-community-write .editor-color-popover.has-custom-picker .editor-custom-picker.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  body.site-community-write .write-meta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}

/* Final write action row and transient message layout */
body.site-community-write .write-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  border-top: 1px solid var(--write-card-line) !important;
  background: rgba(10, 17, 20, 0.96) !important;
  padding: 10px 14px !important;
}

html[data-theme="light"] body.site-community-write .write-actions {
  background: rgba(255, 255, 255, 0.96) !important;
}

body.site-community-write #post-write-message {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 20px;
  margin: 0 !important;
  padding: 0 12px 0 0 !important;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.site-community-write #post-write-message.error {
  color: #ff9f9f;
}

body.site-community-write #post-write-message.success {
  color: var(--accent-strong);
}

body.site-community-write .write-actions .forum-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 40px;
  border: 1px solid rgba(139, 191, 152, 0.30) !important;
  border-radius: 8px;
  background: rgba(139, 191, 152, 0.16) !important;
  color: var(--text-strong) !important;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 950;
  box-shadow: none !important;
}

body.site-community-write .write-actions .forum-action-btn:hover,
body.site-community-write .write-actions .forum-action-btn:focus-visible {
  border-color: rgba(179, 216, 189, 0.50) !important;
  background: rgba(139, 191, 152, 0.23) !important;
  transform: translateY(-1px);
}

body.site-community-write .write-actions .forum-action-btn.secondary {
  border-color: var(--write-card-line) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: var(--muted) !important;
}

body.site-community-write .write-actions .forum-action-btn.secondary:hover,
body.site-community-write .write-actions .forum-action-btn.secondary:focus-visible {
  border-color: var(--line-strong) !important;
  background: rgba(255, 255, 255, 0.075) !important;
  color: var(--text-strong) !important;
}

@media (max-width: 620px) {
  body.site-community-write .write-actions {
    flex-wrap: wrap;
  }

  body.site-community-write #post-write-message {
    flex-basis: 100%;
    padding-right: 0 !important;
  }
}

@media (max-width: 480px) {
  body.site-community-write .editor-color-popover.has-custom-picker .editor-custom-color-field {
    height: 176px;
  }
}

/* Final editor toolbar compact grouping pass */
body.site-community-write .write-meta-grid {
  grid-template-columns: minmax(106px, 126px) minmax(122px, 144px) minmax(0, 1fr) !important;
  gap: 9px !important;
}

body.site-community-write .write-category-field,
body.site-community-write .write-tags-field {
  padding-right: 8px !important;
  padding-left: 8px !important;
}

body.site-community-write .write-category-field .mw-select-trigger,
body.site-community-write select#post-category + .mw-select .mw-select-trigger,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger {
  padding-left: 52px !important;
  padding-right: 26px !important;
}

body.site-community-write .write-category-field .mw-select-trigger::after,
body.site-community-write select#post-category + .mw-select .mw-select-trigger::after,
body.site-community-write select#post-visibility + .mw-select .mw-select-trigger::after {
  right: 9px !important;
}

body.site-community-write select#post-category + .mw-select .mw-select-menu,
body.site-community-write select#post-visibility + .mw-select .mw-select-menu {
  top: calc(100% + 7px) !important;
  width: 100% !important;
  min-width: 128px !important;
  max-width: 168px !important;
}

body.site-community-write select#post-visibility + .mw-select .mw-select-menu {
  min-width: 146px !important;
  max-width: 180px !important;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs {
  grid-template-columns: auto auto auto auto auto auto;
  grid-template-areas:
    "run font size line style color"
    "list align insert insert insert insert";
  align-content: center;
  gap: 7px 9px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group {
  padding-right: 9px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(6) {
  min-width: 76px;
}

body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(7),
body.site-community-write .editor-toolbar.editor-toolbar-docs > .editor-toolbar-group:nth-child(8) {
  justify-self: start;
}

body.site-community-write .editor-size-menu {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  max-height: 232px !important;
  overflow-y: auto !important;
  padding: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(232, 241, 238, 0.52) rgba(255, 255, 255, 0.08) !important;
}

body.site-community-write .editor-size-menu::-webkit-scrollbar {
  display: block !important;
  width: 8px;
}

body.site-community-write .editor-size-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

body.site-community-write .editor-size-menu::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(232, 241, 238, 0.48);
  background-clip: content-box;
}

body.site-community-write .editor-size-option {
  justify-content: flex-start !important;
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 14px !important;
  text-align: left !important;
}

body.site-community-write .editor-line-height-trigger {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.site-community-write .editor-line-height-trigger svg {
  width: 21px;
  height: 21px;
}

body.site-community-write .editor-line-height-caret {
  display: none;
}

body.site-community-write .editor-line-height-menu {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  padding: 4px !important;
  gap: 2px !important;
}

body.site-community-write .editor-line-height-menu button {
  justify-content: center !important;
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 !important;
  text-align: center !important;
}

body.site-community-write .editor-line-height-custom {
  display: block;
  margin-top: 3px;
  padding: 7px 4px 3px;
}

body.site-community-write .editor-line-height-custom span {
  display: none !important;
}

body.site-community-write .editor-line-height-custom input {
  width: 100% !important;
  min-height: 30px !important;
  padding: 0 5px !important;
}

body.site-community-write .editor-color-popover {
  width: 286px;
  padding: 10px;
}

body.site-community-write .editor-color-grid {
  grid-template-columns: repeat(10, 22px) !important;
  justify-content: center;
  align-items: center;
  gap: 4px !important;
}

body.site-community-write .editor-color-popover .editor-color-swatch {
  display: grid !important;
  place-items: center !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 7px !important;
}

body.site-community-write .color-dot {
  width: 19px !important;
  height: 19px !important;
  border-radius: 999px !important;
}

body.site-community-write .editor-theme-list {
  gap: 6px;
}

body.site-community-write .editor-theme-card {
  min-height: 38px;
  padding: 7px 9px !important;
}

body.site-community-write .editor-theme-card-colors {
  gap: 3px;
}

body.site-community-write .editor-theme-card-colors span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--theme-color);
}

body.site-community-write .editor-theme-card.is-active {
  border-color: rgba(104, 199, 238, 0.46) !important;
  background: rgba(104, 199, 238, 0.13) !important;
  color: var(--editor-toolbar-accent) !important;
}

body.site-community-write .editor-color-popover.has-custom-picker {
  width: auto;
}

@media (max-width: 1180px) {
  body.site-community-write .editor-toolbar.editor-toolbar-docs {
    grid-template-columns: auto auto auto auto;
    grid-template-areas:
      "run font size line"
      "style color list align"
      "insert insert insert insert";
  }
}

@media (max-width: 820px) {
  body.site-community-write .write-meta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
/* Notice registration modes */
body.site-community-write .notice-mode-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(104, 199, 238, 0.22);
  border-radius: 8px;
  background: rgba(104, 199, 238, 0.07);
  padding: 12px;
}

body.site-community-write .notice-mode-panel.hidden {
  display: none !important;
}

body.site-community-write .notice-mode-tabs,
body.site-community-write .notice-target-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body.site-community-write .notice-mode-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--write-field-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 950;
}

body.site-community-write .notice-mode-tabs button:hover,
body.site-community-write .notice-mode-tabs button.is-active {
  border-color: rgba(104, 199, 238, 0.46);
  background: rgba(104, 199, 238, 0.14);
  color: var(--text-strong);
}

body.site-community-write .notice-target-field {
  display: grid;
  grid-template-columns: auto minmax(128px, 170px);
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--write-field-border);
  border-radius: 8px;
  background: var(--write-field-bg);
  padding: 0 10px;
}

body.site-community-write .notice-target-field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

body.site-community-write .notice-target-field select {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font-weight: 900;
}

body.site-community-write .notice-mode-helper {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

body.site-community-write.site-notice-write:not(.notice-type-normal) .editor-toolbar {
  display: none !important;
}

body.site-community-write.site-notice-write.notice-type-special #post-body-editor {
  align-self: stretch;
  min-height: 104px !important;
  margin: 16px 18px !important;
  border: 1px solid rgba(104, 199, 238, 0.36) !important;
  border-left-width: 5px !important;
  border-radius: 8px !important;
  background: rgba(104, 199, 238, 0.10) !important;
  padding: 18px 20px !important;
  font-size: 1rem;
  font-weight: 850;
}

body.site-community-write.site-notice-write.notice-type-forced #post-body-editor {
  align-self: center;
  width: min(100% - 36px, 560px) !important;
  min-height: 190px !important;
  margin: 26px auto !important;
  border: 1px solid rgba(215, 170, 100, 0.38) !important;
  border-radius: 8px !important;
  background: rgba(20, 24, 23, 0.98) !important;
  padding: 22px !important;
  font-size: 0.98rem;
  line-height: 1.6;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] body.site-community-write.site-notice-write.notice-type-forced #post-body-editor {
  background: rgba(255, 255, 255, 0.98) !important;
}

@media (max-width: 760px) {
  body.site-community-write .notice-mode-panel {
    grid-template-columns: 1fr;
  }

  body.site-community-write .notice-target-field {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

/* 2026-06-05: compact notice settings bar */
body.site-community-write.site-notice-write .notice-mode-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px 12px;
  border-color: rgba(104, 199, 238, 0.26);
  background:
    linear-gradient(180deg, rgba(104, 199, 238, 0.09), rgba(104, 199, 238, 0.045)),
    rgba(255, 255, 255, 0.018);
  padding: 10px;
}

body.site-community-write.site-notice-write .notice-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: min(100%, 340px);
}

body.site-community-write.site-notice-write .notice-mode-tabs button {
  min-height: 36px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 0.8rem;
  line-height: 1;
}

body.site-community-write.site-notice-write .notice-mode-tabs button.is-active {
  border-color: rgba(104, 199, 238, 0.62);
  background: rgba(104, 199, 238, 0.18);
  box-shadow: inset 0 0 0 1px rgba(104, 199, 238, 0.14);
}

body.site-community-write.site-notice-write .notice-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(146px, 176px));
  justify-content: end;
  gap: 8px;
}

body.site-community-write.site-notice-write .notice-target-field {
  grid-template-columns: 1fr;
  align-content: center;
  gap: 5px;
  min-height: 54px;
  padding: 7px 9px;
}

body.site-community-write.site-notice-write .notice-target-field.hidden {
  display: none !important;
}

body.site-community-write.site-notice-write .notice-target-field > span {
  font-size: 0.72rem;
  line-height: 1;
}

body.site-community-write.site-notice-write .notice-target-field select + .mw-select {
  width: 100%;
  min-width: 0;
}

body.site-community-write.site-notice-write .notice-target-field .mw-select-trigger {
  min-height: 30px;
  padding-right: 10px;
  padding-left: 0;
  border: 0;
  background: transparent !important;
  font-size: 0.82rem;
}

body.site-community-write.site-notice-write .notice-mode-helper {
  grid-column: 1 / -1;
  padding: 0 2px;
  font-size: 0.8rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  body.site-community-write.site-notice-write .notice-mode-panel,
  body.site-community-write.site-notice-write .notice-target-grid {
    grid-template-columns: 1fr;
  }
}

/* "준비 중" media buttons: visible but clearly upcoming. */
body.site-community-write .editor-toolbar button.is-soon {
  position: relative;
}

body.site-community-write .editor-toolbar button.is-soon .editor-tool-svg {
  opacity: 0.62;
}

body.site-community-write .editor-toolbar button.is-soon::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--warning);
}

body.site-community-write .editor-toolbar button.is-soon:hover .editor-tool-svg,
body.site-community-write .editor-toolbar button.is-soon:focus-visible .editor-tool-svg {
  opacity: 0.85;
}
