.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.problem-wrap {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.problem-detail h1 {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 38px);
}

.problem-detail,
.solution-panel {
  padding: 28px 32px;
}

.solution-panel .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.solution-panel .section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}

.problem-label,
.problem-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.problem-description {
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  margin-top: 4px;
}

.problem-label {
  color: var(--btn-a);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#solution-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#solution-content {
  width: 100%;
  box-sizing: border-box;
  min-height: 150px;
  resize: vertical;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#solution-content::placeholder {
  color: var(--text-muted);
}

#solution-content:focus {
  border-color: var(--border-focus);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.solution-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.solution-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.solution-card.accepted {
  border-color: var(--success);
}

.solution-heading {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.solution-actions {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

.solution-actions .icon-btn,
.problem-detail-actions .icon-btn { opacity: 1; }

.problem-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.problem-title-row h1 { margin: 4px 0 10px; flex: 1; }

.problem-detail-actions {
  display: inline-flex;
  gap: 2px;
  flex: 0 0 auto;
  margin-top: 8px;
}

.solution-card p { white-space: pre-wrap; color: var(--text-dim); line-height: 1.6; margin-bottom: 10px; }

@media (max-width: 640px) {
  .problem-detail,
  .solution-panel { padding: 22px 18px; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .problem-wrap { width: min(100% - 20px, 900px); padding-top: 20px; }
}
