* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Times New Roman", serif;
  background: #f6f8fb;
  color: #1f2937;
}

.app-shell {
  max-width: 1100px;
  margin: 20px auto 32px;
  padding: 0 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card {
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 18px 20px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
}

.muted {
  color: #6b7280;
}

.invite-text {
  max-height: 80vh;
  min-height: 420px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  line-height: 1.5;
}

.invite-text ul {
  margin: 8px 0 12px 22px;
}

.group-options {
  display: flex;
  gap: 24px;
  margin: 16px 0 6px;
}

.group-options label {
  font-size: 17px;
}

.intro-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}

.reviewer-label {
  font-weight: bold;
}

.reviewer-input {
  height: 36px;
  min-width: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 15px;
}

.anonymous-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.small-note {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  border: 1px solid #9aa5b1;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 15px;
}

.btn:hover {
  background: #f3f4f6;
}

.btn.primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.btn.primary:hover {
  background: #1e40af;
}

.btn.success {
  background: #047857;
  border-color: #047857;
  color: #fff;
}

.btn.success:hover {
  background: #065f46;
}

.hidden {
  display: none;
}

.error {
  color: #b91c1c;
  font-size: 14px;
  margin-top: 8px;
}

.info-card,
.score-card {
  margin-bottom: 14px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  background: #e8eefc;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.qa-block {
  margin-top: 10px;
}

.qa-block h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.content-box {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  line-height: 1.45;
  max-height: 220px;
  overflow-y: auto;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px 16px;
}

.score-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.score-item label {
  font-weight: bold;
}

.score-buttons {
  display: grid;
  grid-template-columns: repeat(10, minmax(24px, 1fr));
  gap: 6px;
}

.score-btn {
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.score-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.score-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 999;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: min(860px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d9e2ec;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  padding: 16px 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #475569;
  cursor: pointer;
}

.modal-content {
  line-height: 1.5;
}

.modal-content ul {
  margin: 8px 0 12px 20px;
}

@media (max-width: 900px) {
  .score-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

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