@font-face {
    font-family: 'PlymouthFont';
    src: url('fonts/PlymouthD.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root { --n: 16; }

/* Center everything */
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    gap: 20px;
    font-family: system-ui, Arial, sans-serif;
    color: #1f2937;
    background: #ffffff;
}

/* Top bar */
.bar {
    text-align: center;
}
.controls { margin-top: 8px; display: flex; gap: 8px; justify-content: center; }
button {
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
button:hover { filter: brightness(0.95); }

/* Drawing board */
.board {
    --size: 960px;
    --n: 16;
    width: var(--size);
    height: var(--size);

    display: flex;
    flex-wrap: wrap;
    border-radius: 12px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,.08),
        0 2px 6px rgba(0,0,0,.06) inset;
    background: #ffffff;
}

/* Squares */
.cell { 
    width: calc(var(--size) / var(--n));
    height: calc(var(--size) / var(--n));
    background: #ffffff;
    transition: background-color .05s linear;
    user-select: none;
}

.title {
    font-family: 'PlymouthFont', 'Tagesschrift', sans-serif;
    text-shadow: 2px 5px 2px #000000; 
    text-align: center; 
    color: #3b82f6;
    font-size: 15vmin;
    margin: 0 auto; 
}

.app {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
    width: min(1200px, 95vw);
    margin-inline: auto;
  }
  
  .panel {
    padding: 14px;
    border-radius: 12px;
  }
  
  .stack { display: grid; gap: 12px; }
  .row { display: flex; align-items: center; gap: 8px; font-size: 14px; }

  .color {
    width: 100%;
    height: 190px;
    border: none;
    padding: 0; margin: 0;
    background: none;
    outline: none;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    cursor: pointer;
  }

.color::-webkit-color-swatch-wrapper { padding: 0; }
.color::-webkit-color-swatch         { border: none; }
.color::-moz-color-swatch            { border: none; }

.btn.gray {
    background: #3b82f6;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
  }

.btn.gray:hover { filter: brightness(.95); }

.slider { display: grid; gap: 6px; }
.sizeLabel { text-align: left; font-weight: 700; }

.board.with-grid .cell { outline: 1px solid rgba(0,0,0,.5); }

/* Custom cursors */
div.board {
  cursor: url('./images/pencil.png') 16 16, crosshair !important; /* using new 32x32 pencil image */
}

div.board.eraser-mode {
  cursor: url('./images/eraser.png') 16 16, auto !important; /* using 32x32 eraser image */
}

.paletteWrap { position: relative; width: 100%; }
.palette {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  outline: none;
  border-radius: 5px;
  cursor: crosshair;
}
.pickDot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0003;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (max-width: 680px) {
    .app {
      grid-template-columns: 1fr;
    }
    .panel { order: 2; }
    .board { order: 1; width: 92vw; height: 92vw; }
}
