:root {
  --bg: #f7f8fb;
  --card: #ffffff;
  --muted: #666666;
  --accent: #2b7cff;
  --danger: #d9534f;
  --radius: 10px;
  --max-width: 900px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #222222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  padding: 28px 16px;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
}

header {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 6px 18px rgba(20, 20, 40, 0.06);
  margin-bottom: 16px;
}

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

.tip .bulb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ffffff 0%, #eaf2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
}

.tip-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.section-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title.small {
  font-size: 13px;
}

.publish-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
  align-items: start;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row-item {
  flex: 1;
}

.row-select {
  width: 160px;
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  background: transparent;
  font-size: 14px;
  color: inherit;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.micro-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px dashed #dfe7ff;
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
  cursor: pointer;
}

.mic-btn.recording {
  border-color: #ff6b6b;
  background: linear-gradient(180deg, #fff0f0, #ffecec);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.img-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e6e9ef;
  position: relative;
}

.img-thumb .remove {
  position: absolute;
  right: 6px;
  top: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  border: none;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

button {
  padding: 10px 14px;
  border-radius: 9px;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

button.tertiary {
  background: #f4f6fb;
  color: var(--muted);
  border: 1px solid #e8eefc;
}

button.danger {
  background: var(--danger);
}

button.danger-outline {
  color: var(--danger);
  border: 1px solid #f5c2c0;
  background: #fff5f5;
}

.aside {
  border-left: 1px dashed #eef3ff;
  padding-left: 12px;
}

.section {
  margin-top: 10px;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.reviews-list {
  background: #ffffff;
  border-radius: 8px;
  padding: 8px;
  min-height: 48px;
}

.review-item {
  padding: 8px;
  border-bottom: 1px solid #f0f2f7;
}

.review-item:last-child {
  border-bottom: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 30, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.modal {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(20, 20, 40, 0.12);
}

.field-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.char-count {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.preview-title {
  font-weight: 700;
}

.preview-description {
  margin-top: 8px;
}

.preview-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preview-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.page-footer {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 880px) {
  .publish-area {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .aside {
    border-left: 0;
    padding-left: 0;
    border-top: 1px dashed #eef3ff;
    padding-top: 12px;
  }

  .preview-header {
    flex-direction: column;
  }
}
