.editor-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.editor-dialog::backdrop {
  background: rgba(20, 18, 15, 0.45);
}

.editor-card {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px;
  border-radius: 10px;
  background: #fff;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head h2 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 26px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#customCounter {
  color: #8a8478;
  font-weight: 650;
}

#customCounter.over-limit {
  color: #dc2626;
}

input,
select,
.editor-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  background: #fff;
}

.editor-card textarea {
  resize: vertical;
  line-height: 1.65;
}

.editor-hint {
  margin: -4px 0 0;
  color: #8a8478;
  font-size: 12px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.text-button,
.solid-button,
.soft-button {
  min-width: 88px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
}

.text-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.solid-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.soft-button {
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: #fffbeb;
  color: #b45309;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
}

.result-modal[hidden] {
  display: none;
}

.result-card {
  width: min(100%, 390px);
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fef3c7;
  color: #d97706;
  font-size: 28px;
}

.result-card h2 {
  margin: 0;
  color: #18181b;
  font-size: 21px;
}

.result-card > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.result-grid > div {
  border-radius: 14px;
  padding: 14px 10px;
  background: #eff6ff;
}

.result-grid > div:nth-child(2) {
  background: #ecfdf5;
}

.result-grid > div:nth-child(n + 3) {
  background: #f4f4f5;
}

.result-grid small {
  display: block;
  color: #3b82f6;
  font-size: 12px;
}

.result-grid > div:nth-child(2) small {
  color: #10b981;
}

.result-grid > div:nth-child(n + 3) small {
  color: var(--muted);
}

.result-grid strong {
  display: block;
  margin-top: 3px;
  color: #2563eb;
  font-size: 32px;
  line-height: 1.1;
}

.result-grid > div:nth-child(2) strong {
  color: #059669;
}

.result-grid > div:nth-child(n + 3) strong {
  color: #3f3f46;
  font-size: 26px;
}

.result-meta {
  margin-top: 16px !important;
  color: var(--muted) !important;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
