:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #64717c;
  --line: #d8e0e5;
  --accent: #126e69;
  --accent-soft: #e2f2ef;
  --gold: #fff1bf;
  --gold-line: #dfb93f;
  --green: #dff1e6;
  --green-line: #62a779;
  --danger: #8b4d00;
  --done: #13733d;
  --shadow: 0 12px 32px rgba(31, 45, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.55;
}

button,
select {
  font: inherit;
}

.page {
  width: 1180px;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header p {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.25;
}

h2 {
  margin: 0;
  font-size: 18px;
}

.top-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.voter-panel,
.status-panel,
.table-panel,
.candidate-panel {
  padding: 18px;
}

.voter-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.status-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.status-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  padding: 10px;
}

.status-item.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.status-name {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.status-value {
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.status-item.is-completed .status-value {
  color: var(--done);
}

.complete-button {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.complete-button:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
  opacity: 0.7;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sub-button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

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

th:nth-child(1),
td:nth-child(1) {
  width: 78px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 280px;
  text-align: left;
}

th:nth-child(3),
td:nth-child(3) {
  width: 118px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 70px;
}

th:nth-child(n + 5):nth-child(-n + 9),
td:nth-child(n + 5):nth-child(-n + 9) {
  width: 86px;
}

th:nth-child(10),
td:nth-child(10) {
  width: 64px;
}

tbody tr.is-gold {
  background: var(--gold);
}

tbody tr.is-gold td {
  border-bottom-color: var(--gold-line);
}

tbody tr.is-green {
  background: var(--green);
}

tbody tr.is-green td {
  border-bottom-color: var(--green-line);
}

.thumbnail {
  width: 60px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: #edf2f5;
  display: block;
}

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

a {
  color: var(--accent);
  font-weight: 700;
}

.vote-cell {
  width: 58px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 22px;
  font-weight: 800;
}

.vote-cell.is-editable {
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}

.vote-cell.is-readonly {
  color: var(--muted);
}

.total-cell {
  font-weight: 800;
}

.candidate-panel {
  margin-top: 18px;
}

.candidate-list {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
}

.candidate-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.empty-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}
