* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: #f5f5f7;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.site-header h1 {
  font-size: 1.3rem;
  margin: 0;
}

#app {
  flex: 1;
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.site-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}

button {
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.primary-button {
  display: block;
  width: 100%;
  background: #2d6cdf;
  color: #fff;
  margin: 8px 0;
  font-size: 1.1rem;
}

.secondary-button {
  background: #d9dee6;
  color: #333;
}

.link-button {
  background: none;
  color: #2d6cdf;
  padding: 6px 0;
  text-decoration: underline;
}

.category-list, .category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.category-chip {
  background: #e6e9ef;
  color: #333;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.category-chip.active {
  background: #2d6cdf;
  color: #fff;
}

.question-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-card {
  text-align: left;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  background: #eee;
}

.status-verified { background: #c8e6c9; }
.status-unverified { background: #eeeeee; }
.status-flagged { background: #ffcdd2; }
.status-needs_recheck { background: #ffe0b2; }
.status-needs_review { background: #fff9c4; }

.quiz-screen .question-area {
  font-size: 1.4rem;
  font-weight: bold;
  min-height: 3em;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.choice-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #d9dee6;
  border-radius: 14px;
  padding: 14px;
  font-size: 1.05rem;
}

.choice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2d6cdf;
  color: #fff;
  font-size: 0.9rem;
}

#quiz-open-input input {
  width: 100%;
  font-size: 1.1rem;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #999;
  margin: 8px 0;
}

.result-screen {
  text-align: center;
}

.result-mark {
  font-size: 1.8rem;
  font-weight: bold;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
}

.modal-content textarea {
  width: 100%;
  border-radius: 10px;
  border: 2px solid #999;
  padding: 8px;
}

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

.modal-actions button {
  flex: 1;
}
