  /* --- YOUR QIFY CSS --- */
  .tool-page-head { margin-bottom: 28px; max-width: 1200px; margin: 0 auto 28px; }
  
  .section-kicker {
    display: inline-block;
    padding: 8px 14px;
    border: var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 999px;
    background: var(--card);
    font-weight: 900;
    margin-bottom: 14px;
  }
  
  .tool-page-head h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; }
  .tool-page-head p { margin: 0; font-size: 1.05rem; line-height: 1.7; max-width: 760px; }
  
  .tool-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .tool-main-card, .tool-preview-card {
    background: var(--card);
    border: var(--border);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 28px;
  }
  
  .tool-main-card h2 { margin: 0 0 10px; font-size: 2rem; }
  .tool-subtext { margin: 0 0 22px; line-height: 1.7; }
  
  .buttons { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
  
  button:not(.nav-drop-btn) {
    flex: 1;
    min-height: 58px;
    padding: 16px;
    border: var(--border);
    border-radius: 16px;
    color: black;
    background: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: var(--shadow-sm);
  }
  
  button.primary { background: var(--yellow); }
  
  button:hover:not(.nav-drop-btn)  { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
  button:active:not(.nav-drop-btn)  { transform: translate(4px, 4px); box-shadow: none; }
  button:disabled:not(.nav-drop-btn)  { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: translate(4px, 4px); }
  
  .preview-card-top h3 { margin: 0 0 8px; font-size: 1.5rem; }
  .preview-card-top p { margin: 0 0 18px; line-height: 1.7; }
  
  .canvas-wrap {
    background: var(--bg-alt);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    justify-content: center;
    overflow: auto;
    max-height: 600px;
  }
  
  .side-note {
    margin-top: 18px;
    margin-bottom: 18px;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  
  .side-note input { width: 20px; height: 20px; accent-color: var(--green); cursor: pointer; }
  
  .quality-box {
    margin-bottom: 22px;
    padding: 40px 20px;
    background: var(--bg-alt);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 18px;
    text-align: center;
    transition: background 0.2s;
  }
  .quality-box.drag { background: var(--yellow); }

  /* Page Nav Customization */
  .page-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background: var(--bg-alt);
    border: var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
  }
  .page-nav button { min-height: 40px; padding: 10px; flex: 0 0 auto; box-shadow: none; }
  #pageIndicator { font-weight: 900; font-size: 1.1rem; flex: 1; text-align: center; }

  /* --- ESSENTIAL JS HOOKS & CANVAS STYLES --- */
  .hidden { display: none !important; }
  
  .canvas-inner { position: relative; display: inline-block; }
  canvas { display: block; background: #fff; touch-action: none; border: var(--border); border-radius: 8px; }
  
  .crop-box {
    position: absolute;
    border: 3px solid var(--green);
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.6);
    cursor: move;
    touch-action: none;
  }
  
  .handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--yellow);
    border: 3px solid #111;
    border-radius: 50%;
    touch-action: none;
  }
  
  .handle.h-nw { left: -10px; top: -10px; cursor: nwse-resize; }
  .handle.h-ne { right: -10px; top: -10px; cursor: nesw-resize; }
  .handle.h-sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
  .handle.h-se { right: -10px; bottom: -10px; cursor: nwse-resize; }
  .handle.h-n  { left: calc(50% - 10px); top: -10px; cursor: ns-resize; }
  .handle.h-s  { left: calc(50% - 10px); bottom: -10px; cursor: ns-resize; }
  .handle.h-e  { right: -10px; top: calc(50% - 10px); cursor: ew-resize; }
  .handle.h-w  { left: -10px; top: calc(50% - 10px); cursor: ew-resize; }

  #status { font-weight: 800; text-align: center; margin-top: 10px; }
  #status.err { color: #d93025; }

  @media (max-width: 1100px) { 
    .tool-shell { grid-template-columns: 1fr; } 
  }
  
  @media (max-width: 600px) {
    body { padding: 20px 12px; }
    .tool-page-head { margin-bottom: 20px; }
    .tool-main-card, .tool-preview-card { padding: 16px; }
    
    /* Give the canvas more room to breathe on mobile */
    .canvas-wrap { 
      padding: 8px; 
      min-height: 55vh; /* Forces it to take up at least 55% of the screen height */
    }
    
    /* Make touch handles bigger for fingers */
    .handle { width: 28px; height: 28px; border-width: 2px; }
    .handle.h-nw { left: -14px; top: -14px; }
    .handle.h-ne { right: -14px; top: -14px; }
    .handle.h-sw { left: -14px; bottom: -14px; }
    .handle.h-se { right: -14px; bottom: -14px; }
    .handle.h-n  { left: calc(50% - 14px); top: -14px; }
    .handle.h-s  { left: calc(50% - 14px); bottom: -14px; }
    .handle.h-e  { right: -14px; top: calc(50% - 14px); }
    .handle.h-w  { left: -14px; top: calc(50% - 14px); }
  }