
    :root {
      --cell-size: 40px;
      --border: #444;
      --bg: #f6f7fb;
      --white: #fff;
      --accent: #2d6cdf;
      --accent-soft: #dce8ff;
      --text: #1f2937;
    }

    * {
      box-sizing: border-box;
    }

    .app {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 24px;
      align-items: start;
    }

    .panel {
        position: relative;
      background: var(--white);
      border-radius: 16px;
      padding: 20px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .controls {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    button {
      border: none;
      background: var(--accent);
      color: white;
      padding: 12px 16px;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 700;
      transition: transform .08s ease, opacity .2s ease;
    }

    button:hover {
      opacity: 0.95;
    }

    button:active {
      transform: scale(0.98);
    }

    .secondary {
      background: #374151;
    }

    /* Grid */
.crossword-wrap {
  overflow: auto;
  position: relative;
}

    .crossword-grid {
      display: grid;
      gap: 0;
      justify-content: start;
      align-content: start;
      background: transparent;
      user-select: none;
    }

.crossword-area {
    position: relative;
  background: #0D2CFF url('../images/patronen/achtergrond-schoolgerief.jpg') repeat;
  border-radius: 18px;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.15),
    inset 0 0 40px rgba(255,255,255,0.4);
}
    .cell {
      width: var(--cell-size);
      height: var(--cell-size);
      position: relative;
      border: 1px solid var(--border);
      background: var(--white);
    }

    .cell.block {
      opacity: 0; /* 50% transparant */
    }

    .cell input {
      width: 100%;
      height: 100%;
      border: none;
      outline: none;
      text-align: center;
      font-size: 22px;
      font-weight: 700;
      text-transform: uppercase;
      background: transparent;
      color: var(--text);
      caret-color: var(--accent);
    }

    .cell.active {
      background: var(--accent-soft);
    }

    .cell.word-highlight {
      background: #c9dafa;
    }

    .number {
      position: absolute;
      top: 2px;
      left: 4px;
      font-size: 10px;
      line-height: 1;
      color: #555;
      font-weight: 700;
      pointer-events: none;
    }

    /* Sidebar */
    .sidebar h2 {
      margin-top: 0;
      margin-bottom: 12px;
    }

    .lists {
      display: grid;
      gap: 18px;
    }

    .clue-list-section h3 {
      margin: 0 0 10px;
      font-size: 18px;
    }

    .clue-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .clue-list li {
      margin-bottom: 8px;
      line-height: 1;
    }

    .clue-list li.active-clue {
      color: var(--accent);
      font-weight: 700;
    }

.clue-popup {
  position: absolute;
  z-index: 50;
  max-width: 260px;
  min-width: 180px;
  background: #ffcd00;
  color: #000;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.clue-popup.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

.clue-popup-number {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #358ad3;
  margin-bottom: 6px;
}

.clue-popup-text {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 6px;
}

.clue-popup-meta {
  font-size: 12px;
  color: #358ad3;
}

.clue-popup-image {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 10px 0 8px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(0,0,0,0.08);
}

.clue-popup-image.hidden {
  display: none;
}
    
.clue-item {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.clue-item.active-clue {
  outline: 2px solid var(--accent);
  background: #eef4ff;
}

.clue-item-text {
  font-weight: 700;
  margin-bottom: 8px;
}

.clue-item-image {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  margin-top: 8px;
}
      
.used-answers {
  margin-top: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.used-answers-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #374151;
}

.used-answers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.used-answer-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #dbeafe;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
    
      
.cell.word-solved {
  background: #22c55e !important;
  border-color: #16a34a !important;
}

.cell.word-solved input {
  background: transparent !important;
  color: white;
  font-weight: 700;
}

.win-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.win-popup.hidden {
  display: none;
}

.win-popup-card {
  width: min(92vw, 420px);
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.win-popup-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.win-popup-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.45;
}

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

.win-popup-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

.win-popup-actions button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}
   
      
    @media (max-width: 980px) {
      .app {
        grid-template-columns: 1fr;
      }
    }
