  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    background: #000;
    font-family: Helvetica, Arial, sans-serif;
  }
  #sketch-wrap {
    position: absolute;
    top: 0; left: 0;
    width: calc(100% - 60px); height: calc(100% - 74px);
    overflow: hidden;
    z-index: 0;
    background: #fff;
    border-radius: 9px;
  }
  canvas#sketch {
    display: block;
    width: 100%; height: 100%;
    touch-action: none;
  }
  #nub {
    position: absolute;
    top: 0; left: 0;
    width: calc(100% - 60px); height: calc(100% - 74px);
    background: transparent;
    touch-action: none;
    z-index: 1;
  }
  canvas#overlay {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: calc(100% - 60px); height: calc(100% - 74px);
    pointer-events: none;
    touch-action: none;
    z-index: 2;
  }
  #cone {
    position: fixed;
    bottom: 10px;
    left: 56px;
    height: 44px;
    z-index: 10;
    touch-action: none;
  }
  #swatch {
    position: fixed;
    top: auto;
    bottom: 10px;
    right: 12px;
  }
  .toolbar-btn {
    position: fixed;
    top: 0px;
    z-index: 10;
    width: 48px;
    height: 48px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 18px;
    line-height: 48px;
    text-align: center;
    touch-action: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
  }
  .toolbar-btn.flash {
    background: var(--accent, #D1477A);
    transition: none;
  }
  #menu-btn { right: 8px; top: 0px; }
  #undo-btn { right: 8px; top: 52px; }
  #tool-toggle-btn { right: 8px; bottom: auto; top: 104px; }
  #menu-flyout { top: 4px; }
  #tool-flyout { top: 104px; }
  #info-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #info-modal-content {
    background: #1a1a1a;
    color: #fff;
    border-radius: 16px;
    padding: 40px 28px;
    text-align: center;
    width: 200px;
  }
  #info-logo svg {
    width: 100%;
    height: auto;
  }
  #info-modal-content h2 {
    font-size: 22px;
    margin-bottom: 4px;
  }
  #info-modal-content p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 20px;
  }
  #info-close-btn {
    background: var(--accent, #D1477A);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    touch-action: none;
  }
  .bottom-btn {
    position: fixed;
    bottom: 6px;
    z-index: 10;
    width: 48px;
    height: 62px;
    background: var(--accent, #D1477A);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 18px;
    line-height: 62px;
    text-align: center;
    touch-action: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
  }
  #modifier-btn { left: 0px; width: calc(100% - 60px); }

  /* Flyout */
  .flyout {
    position: fixed;
    right: 64px;
    z-index: 11;
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.08s, transform 0.08s;
  }
  .flyout.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateX(0);
  }
  .flyout-btn {
    width: 48px;
    height: 48px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    cursor: pointer;
    transition: background 0.3s;
  }
  .flyout-btn.active {
    background: var(--accent, #D1477A);
  }

  /* --- Left-hand mode --- */
  body.left-hand #sketch-wrap,
  body.left-hand #nub,
  body.left-hand canvas#overlay {
    left: auto; right: 0;
  }
  body.left-hand #menu-btn { right: auto; left: 8px; }
  body.left-hand #undo-btn { right: auto; left: 8px; }
  body.left-hand #tool-toggle-btn { right: auto; left: 8px; }
  body.left-hand .flyout {
    right: auto;
    left: 64px;
    flex-direction: row;
    transform: translateX(-20px);
  }
  body.left-hand .flyout.open {
    transform: translateX(0);
  }
  body.left-hand #modifier-btn { left: auto; right: 0px; }
  #hand-toggle-btn {
    background: transparent;
    color: #aaa;
    border: 1px solid #444;
    border-radius: 9px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    touch-action: none;
    margin-bottom: 12px;
  }