:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f5ff;
  --ink: #17191f;
  --muted: #626774;
  --line: #dfe4ee;
  --accent: #0f62fe;
  --accent-dark: #093f9f;
  --pink: #d93f73;
  --green: #1f9d63;
  --warning: #9b5b00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
}

button {
  min-height: 42px;
  padding: 0 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.feedback-shell {
  width: calc(100% - 28px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 0 54px;
}

.feedback-header {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.04;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.toolbar,
.composer,
.detail-panel,
.post-card,
.admin-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
}

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

select,
input,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

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

.mine-filter {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.mine-filter input {
  width: auto;
  min-height: 0;
}

.composer {
  margin-bottom: 18px;
  padding: 18px;
}

.composer form {
  display: grid;
  gap: 12px;
}

.warning {
  padding: 12px;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--warning);
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.post-list {
  display: grid;
  gap: 10px;
}

.post-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  color: inherit;
  text-align: left;
}

.post-card.is-mine,
.comment.is-mine {
  border-color: rgba(15, 98, 254, 0.55);
  background: #f2f7ff;
}

.post-card.is-selected {
  outline: 2px solid var(--accent);
}

.post-meta,
.post-actions,
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.status-chip {
  background: #ecf8f2;
  color: var(--green);
}

.post-card h3 {
  margin: 0;
  font-size: 18px;
}

.post-card p,
.detail-body,
.comment p {
  color: #3e424c;
  white-space: pre-wrap;
}

.detail-panel {
  min-height: 260px;
  padding: 18px;
}

.detail-title {
  margin-bottom: 6px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.vote-button {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.vote-button.is-active {
  background: var(--accent);
  color: #fff;
}

.comment-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.comment {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.empty,
.error {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.error {
  border-color: rgba(217, 63, 115, 0.45);
  color: var(--pink);
}

.admin-output {
  overflow: auto;
  min-height: 240px;
  padding: 14px;
  white-space: pre-wrap;
}

@media (max-width: 840px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .toolbar > label,
  .toolbar > button {
    flex: 1 1 180px;
  }
}
