/* g46 分类接龙 - 样式 */

.g46-root {
  --cream: #fff8e8;
  --ink: #24233a;
  --pink: #ffb8c9;
  --purple: #bfc3ff;
  --yellow: #ffe26f;
  --mint: #aee8df;
  --red: #ff6b6b;
  --radius: 16px;
  --border: 3px solid var(--ink);
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100%;
  padding: 16px;
  box-sizing: border-box;
}

.g46-root * { box-sizing: border-box; }

.g46-setup, .g46-game, .g46-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 16px;
}

.g46-setup h2, .g46-finish h2 {
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

.g46-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.g46-field label {
  font-size: 1rem;
  font-weight: 600;
}

.g46-field input {
  width: 80px;
  height: 48px;
  font-size: 1.2rem;
  text-align: center;
  border: var(--border);
  border-radius: var(--radius);
  background: white;
}

.g46-btn {
  min-height: 48px;
  min-width: 48px;
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  touch-action: manipulation;
}

.g46-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.g46-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.g46-btn--primary {
  background: var(--pink);
  box-shadow: 0 4px 0 var(--ink);
}

.g46-btn--secondary {
  background: var(--purple);
  box-shadow: 0 4px 0 var(--ink);
}

.g46-btn--warn {
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink);
}

.g46-btn--mint {
  background: var(--mint);
  box-shadow: 0 4px 0 var(--ink);
}

.g46-btn--danger {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 0 var(--ink);
}

.g46-btn--ghost {
  background: transparent;
  border: 2px solid var(--ink);
  box-shadow: none;
}

/* 分类卡 */
.g46-category-card {
  background: white;
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.g46-category-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #666;
}

.g46-category-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* 示例折叠 */
.g46-examples-toggle {
  font-size: 0.85rem;
  color: #888;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 8px;
  text-decoration: underline;
}

.g46-examples {
  display: none;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #666;
}

.g46-examples--open {
  display: block;
}

/* 倒计时 */
.g46-countdown {
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  padding: 16px;
}

.g46-countdown--urgent {
  color: var(--red);
}

/* 进度 */
.g46-progress {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.g46-progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
}

.g46-progress-dot--done {
  background: var(--mint);
}

.g46-turn-info {
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

/* 裁定 */
.g46-judge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.g46-judge-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.g46-judge-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 排行榜 */
.g46-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.g46-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.g46-score-row--top {
  background: var(--yellow);
}

.g46-score-name { font-weight: 600; }
.g46-score-value { font-weight: 800; font-size: 1.2rem; }

.g46-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .g46-btn { transition: none; }
  .g46-btn:active { transform: none; }
}

@media (max-width: 360px) {
  .g46-root { padding: 12px 8px; }
  .g46-countdown { font-size: 3rem; }
  .g46-category-card { padding: 16px; }
  .g46-actions { gap: 8px; }
  .g46-btn { padding: 10px 16px; font-size: 1rem; }
}
