:root {
  --ink: #1b1f2a;
  --muted: #667085;
  --subtle: #8a94a6;
  --line: #e3e7ef;
  --soft: #f6f7fa;
  --paper: #ffffff;
  --brand: #c91f28;
  --brand-dark: #8f141b;
  --brand-soft: #fff1f2;
  --gold: #a76b13;
  --green: #16835f;
  --warn: #b45309;
  --shadow: 0 14px 36px rgba(30, 38, 64, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #f1f3f7;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(201, 31, 40, 0.06), rgba(201, 31, 40, 0) 280px),
    #f3f5f8;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(227, 231, 239, 0.9);
  backdrop-filter: blur(12px);
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--brand);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  min-width: 0;
  font-size: 17px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand span:not(.brand-mark),
.muted {
  color: var(--muted);
  font-size: 13px;
}

.timer {
  min-width: 144px;
  padding: 9px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--radius);
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(201, 31, 40, 0.2);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 8px;
}

.hero-copy,
.rule-board,
.panel,
.quiz-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-top: 4px solid var(--brand);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 96px;
  height: 6px;
  background: var(--brand);
  opacity: 0.18;
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.22;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
}

.lead {
  max-width: 620px;
  margin: 16px 0 0;
  color: #495266;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.rule-board {
  padding: 22px;
}

.rule-board-title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 800;
}

.panel,
.quiz-panel {
  padding: 22px;
  margin: 18px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-panel .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  min-height: 92px;
  padding: 15px;
  border: 1px solid #eadde0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fff8f8);
}

.metric b {
  display: block;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1.2;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.quiz-heading,
.dashboard-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.dashboard-title {
  align-items: flex-start;
  flex-direction: column;
  margin: 4px 0 14px;
}

.dashboard-title h1 {
  font-size: 28px;
}

.quiz-badge {
  flex: 0 0 auto;
  padding: 6px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #f4c6ca;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.question {
  position: relative;
  padding: 22px 0 22px 52px;
  border-top: 1px solid var(--line);
}

.question::before {
  content: var(--question-index);
  position: absolute;
  left: 0;
  top: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #f0c3c7;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.question:first-child {
  border-top: 0;
}

.question h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: #2b3445;
  font-size: 12px;
  font-weight: 800;
}

.nomination-card {
  margin-top: 6px;
  padding-right: 16px;
  border: 1px solid #f0c3c7;
  border-radius: var(--radius);
  background: #fffafa;
}

.nomination-card::before {
  content: "21";
  top: 22px;
  left: 16px;
}

.nomination-card h3,
.nomination-card p,
.nomination-card .form-grid,
.nomination-card .field {
  margin-left: 16px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  margin: 9px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.option:hover {
  border-color: #ef9ca3;
  background: #fffafa;
  transform: translateY(-1px);
}

.option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--brand);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(201, 31, 40, 0.12);
}

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

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: var(--radius);
  padding: 11px 18px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(201, 31, 40, 0.18);
}

button:hover {
  background: var(--brand-dark);
}

button.secondary {
  color: var(--ink);
  background: #eceff5;
  box-shadow: none;
}

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

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

.text-link {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.notice {
  margin: 16px 0 0;
  border-left: 4px solid var(--gold);
  background: #fff8ec;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #5b3b0c;
}

.success {
  border-left-color: var(--green);
  background: #edfdf5;
  color: #115c44;
}

.result-panel {
  max-width: 720px;
  margin-inline: auto;
}

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

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #424a5b;
  background: #f7f8fb;
  font-weight: 800;
}

tbody tr:hover {
  background: #fffafa;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .brand {
    width: 100%;
  }

  .brand strong {
    white-space: normal;
  }

  .timer {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-copy,
  .rule-board,
  .panel,
  .quiz-panel {
    padding: 18px;
  }

  h1 {
    font-size: 26px;
  }

  h2,
  .dashboard-title h1 {
    font-size: 21px;
  }

  .grid,
  .hero-panel .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: auto;
  }

  .quiz-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .question {
    padding-left: 0;
  }

  .question::before {
    position: static;
    margin-bottom: 10px;
  }

  .nomination-card {
    padding: 16px;
  }

  .nomination-card h3,
  .nomination-card p,
  .nomination-card .form-grid,
  .nomination-card .field {
    margin-left: 0;
  }

  .actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
