* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font, sans-serif);
  background-color: var(--bg, #f5f7fa);
  color: var(--text, #2d3748);
  line-height: 1.6;
  padding: 1rem;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.header h1 {
  font-size: 1.4rem;
  color: var(--brand, #3182ce);
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted, #718096);
}

.card {
  background: var(--card, #ffffff);
  border-radius: var(--radius, 12px);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--brand, #3182ce);
  text-align: center;
}

.knowledge {
  background: var(--soft, #ebf8ff);
  padding: 1rem;
  border-radius: var(--radius, 12px);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.rules {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.rules ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.badge {
  background: var(--soft, #edf2f7);
  color: var(--text, #2d3748);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-weight: bold;
  font-size: 0.95rem;
}

.scramble-area {
  text-align: center;
  margin-bottom: 1.25rem;
}

.label {
  font-size: 0.9rem;
  color: var(--muted, #718096);
  margin-bottom: 0.5rem;
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tile {
  background: var(--brand, #3182ce);
  color: var(--on-brand, #ffffff);
  font-size: 1.35rem;
  font-weight: bold;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius, 8px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hint-area {
  background: var(--soft, #f7fafc);
  padding: 1rem;
  border-radius: var(--radius, 10px);
  margin-bottom: 1.25rem;
  text-align: center;
}

.clue {
  font-size: 1.05rem;
  font-weight: 500;
}

.char-hint {
  margin-top: 0.5rem;
  color: var(--brand, #3182ce);
  font-weight: bold;
  font-size: 1rem;
}

.input-area input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.15rem;
  font-family: inherit;
  border: 2px solid var(--muted, #cbd5e0);
  border-radius: var(--radius, 10px);
  margin-bottom: 1rem;
  text-align: center;
  background: var(--bg, #fff);
  color: var(--text, #000);
}

.input-area input:focus {
  outline: none;
  border-color: var(--brand, #3182ce);
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.85rem 1.2rem;
  border: none;
  border-radius: var(--radius, 10px);
  cursor: pointer;
  transition: opacity 0.2s;
  flex: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand, #3182ce);
  color: var(--on-brand, #ffffff);
}

.btn-soft {
  background: var(--soft, #e2e8f0);
  color: var(--text, #2d3748);
}

.btn-large {
  width: 100%;
  font-size: 1.1rem;
  padding: 1rem;
}

.feedback {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius, 10px);
  text-align: center;
}

.feedback.ok {
  background: var(--soft, #f0fff4);
  border: 2px solid var(--ok, #38a169);
  color: var(--ok, #38a169);
}

.feedback.bad {
  background: var(--soft, #fff5f5);
  border: 2px solid var(--bad, #e53e3e);
  color: var(--bad, #e53e3e);
}

#feedback-msg {
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 0.85rem;
}

.score-circle {
  font-size: 3rem;
  font-weight: bold;
  color: var(--brand, #3182ce);
  text-align: center;
  margin: 0.5rem 0;
}

.score-circle small {
  font-size: 1.5rem;
  color: var(--muted, #718096);
}

.eval-text {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.review-section h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.review-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.review-list li {
  padding: 0.65rem;
  border-bottom: 1px solid var(--soft, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.tag-ok { color: var(--ok, #38a169); font-weight: bold; }
.tag-bad { color: var(--bad, #e53e3e); font-weight: bold; }

@media (max-width: 480px) {
  .action-buttons {
    flex-direction: column;
  }
}