* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #fff;
  color: #111;
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
main { max-width: 600px; margin: 0 auto; padding: 48px 16px 80px; }

h1 { font-size: 24px; font-weight: 600; margin: 0; }
h2 { font-size: 14px; font-weight: 600; margin: 48px 0 12px; }
header p { margin: 4px 0 0; color: #666; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
nav { display: flex; gap: 16px; font-size: 14px; }
nav a, .link { color: #666; text-decoration: none; }
nav a:hover, .link:hover:not(:disabled) { color: #111; }
.link { font: inherit; padding: 0; border: 0; background: none; cursor: pointer; }
.link:disabled { color: #aaa; opacity: 1; cursor: default; }
.docs h2 { font-size: 16px; margin-top: 36px; }
.docs p, .docs li { color: #333; }
.docs ul { padding-left: 20px; margin: 0; }
.docs li + li { margin-top: 4px; }
.muted { color: #888; margin: 0; }
a { color: inherit; }

.now { display: flex; gap: 40px; margin: 40px 0 32px; }
.now div { display: flex; flex-direction: column; }
.label { font-size: 13px; color: #888; }
.now span:not(.label) { font-size: 28px; font-variant-numeric: tabular-nums; }

form { display: grid; gap: 8px; }
input, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: #fff;
  border: 1px solid #ddd; border-radius: 6px; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: #111; }
input::placeholder, textarea::placeholder { color: #aaa; }
.form-foot { display: flex; align-items: center; gap: 12px; }
#form-msg { flex: 1; font-size: 14px; color: #666; }
#form-msg.error { color: #c00; }
#reason-count { font-size: 13px; color: #aaa; font-variant-numeric: tabular-nums; }

button {
  font: inherit; cursor: pointer; padding: 8px 16px; border-radius: 6px;
  border: 1px solid #111; background: #111; color: #fff;
}
button:disabled { opacity: 0.35; cursor: default; }
.entry-side button:disabled:not(.ghost) { opacity: 1; }
button.ghost { background: #fff; color: #111; border-color: #ddd; }
button.ghost:hover:not(:disabled) { border-color: #111; }

ol { list-style: none; margin: 0; padding: 0; }
#board li, #history li, #archive li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid #eee; }
#board li:last-child, #history li:last-child, #archive li:last-child { border-bottom: 1px solid #eee; }
.more { margin: 12px 0 0; font-size: 14px; }
.more a { color: #666; }
.totals { display: flex; gap: 40px; margin: 32px 0 8px; }
.totals div { display: flex; flex-direction: column; }
.totals span:not(.label) { font-size: 22px; font-variant-numeric: tabular-nums; }
#load-more { margin-top: 16px; }
.entry-main { flex: 1; min-width: 0; }
.entry-name { font-weight: 600; overflow-wrap: anywhere; }
.entry-meta { font-size: 13px; color: #888; margin-left: 6px; }
.entry-reason { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.entry-votes { font-variant-numeric: tabular-nums; }

.rules p { margin: 0; color: #666; }

#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 6px;
  background: #111; color: #fff; font-size: 14px;
}
#toast.error { background: #c00; }

@media (max-width: 480px) {
  main { padding-top: 32px; }
  .now { gap: 24px; }
  .now span:not(.label) { font-size: 22px; }
}
