/* Pattern Builder — complete shape, color, and number patterns */

.pb-setup {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pb-setup h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.pb-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pb-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  min-width: 170px;
  text-align: left;
}

.pb-pick strong { font-size: 1rem; }
.pb-pick small { color: var(--color-text-soft); }

.pb-pick[aria-pressed="true"] {
  border-color: var(--color-primary);
  background: rgba(79, 216, 224, 0.12);
}

.pb-pick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pb-start-btn {
  align-self: flex-start;
  margin-top: 4px;
}

.pb-rewards {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.pb-rewards strong { color: var(--color-text); }

.pb-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(236, 64, 122, 0.1), rgba(74, 20, 140, 0.1));
  border: 1px solid var(--color-border);
}

.pb-theme-puzzlecove { background: linear-gradient(180deg, rgba(79, 216, 224, 0.14), rgba(1, 87, 155, 0.14)); }
.pb-theme-patternpeak { background: linear-gradient(180deg, rgba(120, 144, 156, 0.16), rgba(38, 50, 56, 0.14)); }
.pb-theme-mosaicgarden { background: linear-gradient(180deg, rgba(102, 187, 106, 0.14), rgba(27, 94, 32, 0.16)); }
.pb-theme-kaleidoscope { background: linear-gradient(180deg, rgba(255, 213, 79, 0.18), rgba(191, 54, 12, 0.14)); }

.pb-sequence {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background: var(--color-bg-alt);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  width: 100%;
}

.pb-arrow {
  color: var(--color-text-soft);
  font-size: 1.2rem;
}

.pb-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px dashed var(--color-primary);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.pb-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 1.3rem;
  font-weight: 700;
}

.pb-banner {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.pb-banner--good {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(74, 222, 128, 0.15);
  color: var(--color-success);
  font-size: 1.05rem;
}

.pb-retry {
  margin-top: 6px;
  color: var(--color-accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.pb-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pb-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}

.pb-choice:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}

.pb-choice--wrong {
  border-color: var(--color-accent);
  background: rgba(238, 111, 168, 0.14);
}

.pb-choice--num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}

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

/* Tokens are drawn with pure CSS, never emoji glyphs, so they render
   identically on every device with no font dependency. */
.pb-token {
  display: inline-block;
  width: 40px;
  height: 40px;
}

.pb-tok--circle-red { background: #ef5350; border-radius: 50%; }
.pb-tok--square-blue { background: #42a5f5; border-radius: 6px; }
.pb-tok--star-yellow {
  background: #ffee58;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pb-tok--diamond-purple {
  background: #ab47bc;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.pb-tok--circle-orange { background: #ffa726; border-radius: 50%; }
.pb-tok--triangle-green {
  background: transparent;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 36px solid #66bb6a;
}
