.page-games .spelling-elements .card{
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-games .spelling-elements .card-header{
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.page-games .spelling-elements {
  --border: rgba(10,20,30,.12);
  --tile: #ffffff;
  --tileHover: rgba(47,111,255,.06);
  --good: rgba(47,111,255,.14);
  --bad: rgba(255, 86, 86, 0.14);
}

.page-title {
  text-align: center;
  margin: 24px 0 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

.page-games .spelling-elements .pt-wrap {
  padding: 0 18px 12px;
}

.page-games .spelling-elements .periodic-main,
.page-games .spelling-elements .periodic-f {
  margin-top:20px;
  display: grid;
  grid-template-columns: repeat(18, minmax(34px, 1fr));
  grid-auto-rows: 52px;
  gap: 6px;
}

.page-games .spelling-elements .element-tile {
  position: relative;
  user-select: none;
  border: 1px solid var(--border);
  background: var(--tile);
  border-radius: 0;
  padding: 6px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-games .spelling-elements .element-tile:hover {
  filter: brightness(1.05);
}

.element-tile .atomic-number {
  position: absolute;
  top: 6px;
  left: 6px;

  font-size: 0.65rem;
  opacity: 0.8;
}

.page-games .spelling-elements .symbol {
  position: absolute;
  top: 4px;
  right: 6px;

  font-size: 1.4rem;
  font-weight: 700;
}

.page-games .spelling-elements .name {
  font-size: 0.65rem;   
  line-height: 1.1;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-games .spelling-elements .joker-tile {
  grid-column: 1;
  grid-row: 2;
  background: linear-gradient(
    145deg,
    rgba(120, 180, 255, 0.18),
    rgba(255,255,255,0.06)
  );
  border: 1px solid rgba(120, 180, 255, 0.45);
}

.page-games .spelling-elements .target {
  margin-top: 16px;
  padding: 16px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  display: flex;
  justify-content: space-between;
}

.page-games .spelling-elements .target-word {
  font-size: 28px;
  font-weight: 800;
}

.page-games .spelling-elements .builder {
  margin-top: 12px;
  padding: 14px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: grid;
  gap: 12px;
}

.page-games .spelling-elements .builder-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
}

.page-games .spelling-elements .build-zone {
  min-height: 64px;
  padding: 10px;
  border-radius: 0;
  border: 1px dashed rgba(255,255,255,0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


.page-games .spelling-elements .build-chip {
  position: relative;
  padding: 6px 10px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);

  display: inline-flex;
  align-items: center;     
  gap: 8px;
}
.page-games .spelling-elements .build-chip .meta {
  display: none;
}

.page-games .spelling-elements .build-chip.selected {
  box-shadow: 0 0 0 2px rgba(120,180,255,.85);
}

.page-games .spelling-elements .chip-x {
  all: unset;
  cursor: pointer;

  font-size: 16px;
  font-weight: 600;
  line-height: 1;

  color: #555;
  margin-left: 4px; 
}

.page-games .spelling-elements .result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 0;
  border: 1px solid var(--border);
}

.page-games .spelling-elements .result.good {
  background: var(--good);
}

.page-games .spelling-elements .result.bad {
  background: var(--bad);
}

.page-games .spellinggame.card {
  transition: box-shadow .18s ease, border-color .18s ease;
}

.page-games .spellinggame.card:hover {
  transform: none;
}
.page-games .spellinggame.card {
  max-width: 1100px;
  margin: 32px auto 48px;

  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fafbff 100%
  );

  border-radius: 0;
  border: 1px solid rgba(47,111,255,.18);

  box-shadow:
    0 12px 32px rgba(0,0,0,.08),
    0 2px 6px rgba(0,0,0,.04);
}

.page-games .spellinggame h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-games .spellinggame h3 {
  margin-top: 24px;
  font-size: 1.1rem;
  font-weight: 700;
}

.page-games .spellinggame .word-label {
  margin-top: 20px;
  margin-bottom: 6px;

  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.page-games .spellinggame .word-input {
  width: 100%;
  padding: 14px 16px;

  font-size: 1.25rem;
  font-weight: 700;

  border-radius: 0;
  border: 2px solid rgba(47,111,255,.35);
  outline: none;
}

.page-games .spellinggame .word-input:focus {
  border-color: #2f6fff;
  box-shadow: 0 0 0 3px rgba(47,111,255,.15);
}
.page-games .spellinggame .word-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

.page-games .spellinggame .word-actions button {
  flex: 1;               
  padding: 12px 0;
  font-weight: 600;
  border-radius: 5px;
}


.page-games .spellinggame .builder {
  background: rgba(47,111,255,.04);
  border: 1px dashed rgba(47,111,255,.35);
}

.page-games .spellinggame .build-zone {
  background: rgba(255,255,255,.85);
  border: 2px dashed rgba(47,111,255,.35);
  transition: background-color .15s ease, border-color .15s ease;
}

.page-games .spellinggame .actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.page-games .spellinggame button {
  flex: 1;
  border-radius: 5px;
  padding: 10px 18px;
  font-weight: 600;
}

.page-games .spellinggame button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.page-games .spellinggame .muted {
  color: #5f6b85;
}

.page-games .spellinggame .divider {
  margin: 28px 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0,0,0,.08),
    transparent
  );
}

   @media (max-width: 768px) {

    .page-games .spelling-elements .pt-wrap {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
  
    .page-games .spelling-elements .pt-classic {
      min-width: 720px;
    }
  
    .page-games .spelling-elements .periodic-main,
    .page-games .spelling-elements .periodic-f {
      grid-template-columns: repeat(18, minmax(22px, 1fr));
      grid-auto-rows: 34px;
      gap: 3px;
    }
  
    .page-games .spelling-elements .element-tile {
      padding: 0;
      justify-content: center;
      align-items: center;
    }
  
    .page-games .spelling-elements .atomic-number,
    .page-games .spelling-elements .name {
      display: none;
    }
  
    .page-games .spelling-elements .symbol {
      position: static;
      font-size: 0.9rem;
      font-weight: 700;
      margin: 0;
    }
  
  }
  
  
