:root {
      --paper: #F0EDE5;
      --ink: #1a1a18;
      --blue: #0019FF;
      --dot: rgba(0, 25, 255, 0.18);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { width: 100%; height: 100%; overflow: hidden; }

    body {
      background-color: var(--paper);
      font-family: 'Bebas Neue', sans-serif;
      color: var(--ink);
      height: 100vh;
      cursor: crosshair;
    }

    /* Dot grid sits behind everything */
    .dot-grid {
      position: fixed;
      inset: 0;
      background-image: radial-gradient(circle, var(--dot) 1.5px, transparent 1.5px);
      background-size: 22px 22px;
      pointer-events: none;
      z-index: 0;
    }

    /* Drawing canvas — behind UI, above dot grid */
    #draw-canvas {
      position: fixed;
      inset: 0;
      z-index: 1;
      cursor: crosshair;
    }

    /* All UI sits on top */
    .page {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2rem;
      width: 100%;
      max-width: 1000px;
      padding: 2rem;
      height: 100vh;
      margin: 0 auto;
      pointer-events: none; /* let clicks pass through to canvas by default */
    }

    /* Re-enable pointer events only on interactive elements */
    header, .toolboxes, footer, .toolbox-wrap, .box-link { pointer-events: auto; }

    header { text-align: center; line-height: 1; }

    .site-title {
      font-family: 'Bebas Neue', sans-serif;
      font-size: clamp(3.5rem, 8vw, 5.5rem);
      line-height: 1;
      color: var(--blue);
      letter-spacing: 0.05em;
      display: inline-block;
    }

    .title-scribble {
      display: block;
      width: 100%;
      height: 10px;
      margin-top: -2px;
      overflow: visible;
    }

    .tagline {
      font-family: 'Bebas Neue', sans-serif;
      font-size: clamp(0.85rem, 1.8vw, 1.05rem);
      color: var(--ink);
      opacity: 0.45;
      margin-top: 0.3rem;
      letter-spacing: 0.14em;
      display: block;
    }

    .toolboxes {
      display: flex;
      gap: 2rem;
      align-items: flex-end;
      justify-content: center;
      flex-wrap: wrap;
    }

    .toolbox-wrap {
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      width: 180px;
    }

    .box-img-wrap {
      position: relative;
      width: 180px;
      height: 233px;
    }

    .box-img {
      position: absolute;
      top: 0; left: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: opacity 0.2s ease;
    }

    .img-closed { opacity: 1; }
    .img-open   { opacity: 0; }
    .toolbox-wrap.open .img-closed { opacity: 0; }
    .toolbox-wrap.open .img-open   { opacity: 1; }

    .box-label { text-align: center; width: 100%; }

    .box-name {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.4rem;
      letter-spacing: 0.08em;
      color: var(--ink);
      display: block;
      line-height: 1.1;
    }

    .box-desc {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.78rem;
      letter-spacing: 0.1em;
      color: var(--ink);
      display: block;
      margin-top: 0.15rem;
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .toolbox-wrap.open .box-desc { max-height: 30px; opacity: 0.55; }

    .box-link {
      display: inline-block;
      margin-top: 0.35rem;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.95rem;
      letter-spacing: 0.12em;
      color: var(--blue);
      text-decoration: none;
      border-bottom: 1.5px solid var(--blue);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease 0.1s;
    }

    .toolbox-wrap.open .box-link { opacity: 1; pointer-events: auto; }
    .box-link:hover { opacity: 0.6 !important; }

    footer {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.95rem;
      letter-spacing: 0.1em;
      color: var(--ink);
      opacity: 0.35;
    }

    /* ── Drawing toolbar ── */
    .toolbar {
      position: fixed;
      bottom: 1.5rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 10;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      background: rgba(240, 237, 229, 0.92);
      border: 1.5px solid rgba(0,0,0,0.1);
      border-radius: 999px;
      padding: 0.45rem 1rem;
      backdrop-filter: blur(4px);
      pointer-events: auto;
    }

    .toolbar-label {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.75rem;
      letter-spacing: 0.12em;
      opacity: 0.4;
      white-space: nowrap;
    }

    .color-btn {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      transition: transform 0.15s, border-color 0.15s;
      flex-shrink: 0;
    }

    .color-btn:hover { transform: scale(1.2); }
    .color-btn.active { border-color: var(--ink); transform: scale(1.15); }

    .toolbar-divider {
      width: 1px;
      height: 16px;
      background: rgba(0,0,0,0.12);
    }

    .size-btn {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      background: none;
      border: 1.5px solid rgba(0,0,0,0.15);
      border-radius: 999px;
      padding: 0.1rem 0.5rem;
      cursor: pointer;
      color: var(--ink);
      transition: background 0.15s;
    }

    .size-btn:hover, .size-btn.active { background: rgba(0,0,0,0.08); }

    .clear-btn {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 0.72rem;
      letter-spacing: 0.1em;
      background: none;
      border: none;
      cursor: pointer;
      color: var(--ink);
      opacity: 0.4;
      padding: 0 0.2rem;
      transition: opacity 0.15s;
    }

    .clear-btn:hover { opacity: 0.8; }

    @media (max-width: 560px) {
      .toolbox-wrap { width: 130px; }
      .box-img-wrap { width: 130px; height: 168px; }
      .toolboxes { gap: 1rem; }
    }
  
    #draw-canvas {
      cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg transform='translate(2,0) rotate(0)'%3E%3Cpath d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z' fill='%23F0EDE5' stroke='%231a1a18' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 2 22, crosshair;
    }