/* Eksik Desen (kidsPatternTile). Styles belong to this game only; every rule is scoped under .kp-pattern-tile. */
.kp-pattern-tile {
  --pt-ink: #2d2a4a;
  --pt-paper: #fdfbff;
  --pt-lilac: #ece6fb;
  --pt-rim: #a897d6;
  --pt-deep: #4b3c8f;
  --pt-focus: #1f5f9e;
  display: block;
  max-width: 980px;
  margin: 0 auto;
  color: var(--pt-ink);
  color-scheme: light;
  line-height: 1.5;
}
.kp-pattern-tile .screen-only { display: block; }
.kp-pattern-tile .print-only { display: none; }
.kp-pattern-tile .kp-instruction { margin: 0 0 14px; font-size: 1.05rem; }
.kp-pattern-tile .kp-subheading { margin: 14px 0 8px; font-size: 1rem; }
.kp-pattern-tile .kp-levels,
.kp-pattern-tile .kp-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.kp-pattern-tile button {
  min-width: 48px;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--pt-ink);
  border-radius: 14px;
  background: var(--pt-paper);
  color: var(--pt-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.kp-pattern-tile button[aria-pressed="true"] { background: var(--pt-lilac); box-shadow: inset 0 0 0 2px var(--pt-deep); }
.kp-pattern-tile button:disabled { opacity: .45; cursor: not-allowed; }
.kp-pattern-tile button:focus-visible { outline: 4px solid var(--pt-focus); outline-offset: 3px; }
.kp-pattern-tile .kp-work { display: grid; gap: 6px; }
.kp-pattern-tile .kp-rule { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--pt-lilac); font-weight: 600; color: var(--pt-ink); }
.kp-pattern-tile .kp-pattern-carpet {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: #fbf9ff;
  border: 2px solid var(--pt-rim);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kp-pattern-tile .kp-pattern-carpet[data-size="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kp-pattern-tile .kp-pattern-carpet[data-size="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kp-pattern-tile .kp-pattern-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #fff;
}
.kp-pattern-tile .kp-pattern-cell svg { display: block; width: 100%; height: 100%; }
.kp-pattern-tile .kp-pattern-cell.kp-missing { border: 2px dashed var(--pt-rim); background: #f7f4ff; }
.kp-pattern-tile .kp-pattern-options { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kp-pattern-tile .kp-pattern-option {
  position: relative;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  touch-action: manipulation;
}
.kp-pattern-tile .kp-pattern-option svg { display: block; width: 100%; height: 100%; }
.kp-pattern-tile .kp-number {
  position: absolute;
  left: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--pt-ink);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}
.kp-pattern-tile .kp-check { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; }
.kp-pattern-tile .kp-status { min-height: 2.2em; margin: 6px 0; font-weight: 700; }
.kp-pattern-tile .kp-status[data-solved="true"] { color: var(--pt-deep); }
.kp-pattern-tile .kp-hint:empty { display: none; }
.kp-pattern-tile .kp-hint { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff7dc; }
.kp-pattern-tile .kp-trains { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--pt-lilac); }
.kp-pattern-tile .kp-trains p { margin: 4px 0; }
.kp-pattern-tile .kp-trains h2, .kp-pattern-tile .kp-trains p { color: var(--pt-ink); }
.kp-pattern-tile .kp-why { font-style: italic; }
@media (min-width: 700px) {
  .kp-pattern-tile .kp-pattern-carpet { padding: 14px; }
}
@media print {
  .kp-pattern-tile .screen-only { display: none; }
  .kp-pattern-tile .print-only { display: block; color: #000; }
  .kp-pattern-tile .print-only button { display: none; }
  .kp-pattern-tile .kp-pattern-cell,
  .kp-pattern-tile .kp-pattern-option { border: 1px solid #000; background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .kp-pattern-tile * { transition: none !important; animation: none !important; }
}
