/* ============================================================
   ANSWER BOXES
   ============================================================ */

.cryptic-boxes {
  display: flex;
  gap: 8px;
  margin: 1rem 0;
}

.cryptic-letter {
  width: 2.5rem;
  height: 2.8rem;
  padding: 0;

  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;

  border: 1px solid var(--main-border-color);
  border-radius: 6px;

  background: var(--main-bg);
  color: var(--text-color);
}

.cryptic-check {
  margin-bottom: 0.75rem;
}

.cryptic-result {
  margin-left: 0.75rem;
  font-weight: 600;
}

.cryptic-result.correct {
  color: #198754;
}

.cryptic-result.wrong {
  color: #dc3545;
}


/* ============================================================
   SCRIBBLE SPACE
   ============================================================ */

.cryptic-scribble {
  margin: 1.5rem 0;
}


/* Open / Close button */

.scribble-toggle {
  margin-bottom: 10px;
}


/* Workspace */

.scribble-workspace {
  width: 100%;
}


/* Actual board */

.scribble-board {
  position: relative;

  width: 100%;
  height: 220px;

  border: 2px dashed var(--main-border-color);
  border-radius: 10px;

  background: var(--main-bg);

  overflow: hidden;

  box-sizing: border-box;
}


/* Individual draggable letters */

.scribble-letter {
  position: absolute;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.3rem;
  font-weight: bold;

  border: 1px solid var(--main-border-color);
  border-radius: 6px;

  background: var(--card-bg);
  color: var(--text-color);

  cursor: grab;

  user-select: none;
  touch-action: none;

  box-sizing: border-box;
}

.scribble-letter:active {
  cursor: grabbing;
}


/* Shuffle / Clear buttons */

.scribble-controls {
  display: flex;
  gap: 8px;

  margin-top: 10px;
}

.scribble-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  width: 100%;
  user-select: none;
}

.scribble-key-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.scribble-key {
  flex: 1;
  min-width: 0;      /* let flexbox actually shrink/grow instead of overflowing */
  height: 48px;       /* a bit taller now that they're wider — easier to tap */
  padding: 0;

  font-size: 1.1rem;
  font-weight: 600;

  border: 1px solid var(--main-border-color);
  border-radius: 6px;

  background: var(--card-bg);
  color: var(--text-color);

  touch-action: manipulation;
}

.scribble-key:active {
  background: var(--main-border-color);
}

.scribble-key-wide {
  flex: 1.6;   /* backspace key gets extra width relative to letter keys */
}
