  :root{
    --bg: #10141b;
    --panel: #171d27;
    --panel-2: #1d2530;
    --line: #2a3341;
    --text: #e6e9ef;
    --muted: #8791a1;

    --code-accent: #5eead4;
    --code-accent-dim: #1d3c39;
    --preview-accent: #f0a868;
    --preview-accent-dim: #4a3520;
  }

  *{ box-sizing: border-box; }



  /* GRID */
  .grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  @media (max-width: 900px){
    .grid{ grid-template-columns: 1fr; }
  }

  .pane{
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel-2);
    display: flex;
    flex-direction: column;
  }

  /* CHROME BAR (shared shell) */
  .chrome-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #141a23;
    border-bottom: 1px solid var(--line);
    gap: 10px;
    flex-wrap: wrap;
  }

  .dots{ display: flex; gap: 6px; }
  .dots span{
    width: 9px; height: 9px; border-radius: 50%;
    background: #3a4352;
  }

  .chrome-tag{
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
  }
  .chrome-tag.code{ background: var(--code-accent-dim); color: var(--code-accent); }
  .chrome-tag.live{ background: var(--preview-accent-dim); color: var(--preview-accent); }

  .pulse{
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse 1.8s infinite;
  }
  @keyframes pulse{
    0%{ box-shadow: 0 0 0 0 rgba(94,234,212,0.5); }
    70%{ box-shadow: 0 0 0 6px rgba(94,234,212,0); }
    100%{ box-shadow: 0 0 0 0 rgba(94,234,212,0); }
  }
  .chrome-tag.live .pulse{ animation-name: pulseAmber; }
  @keyframes pulseAmber{
    0%{ box-shadow: 0 0 0 0 rgba(240,168,104,0.5); }
    70%{ box-shadow: 0 0 0 6px rgba(240,168,104,0); }
    100%{ box-shadow: 0 0 0 0 rgba(240,168,104,0); }
  }

  .device-toggle{
    display: flex;
    gap: 2px;
    background: #10141b;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2px;
  }
  .device-toggle button{
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 16px;
    cursor: pointer;
  }
  .device-toggle button.active{
    background: var(--preview-accent-dim);
    color: var(--preview-accent);
  }

  /* EDITOR */
  .editor-shell{
    display: flex;
    height: 500px;
    background: #0e1219;
  }

  .line-numbers{
    flex: 0 0 auto;
    width: 44px;
    padding: 15px 0;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #45505f;
    background: #10151c;
    border-right: 1px solid var(--line);
    overflow: hidden;
    user-select: none;
  }
  .line-numbers div{ padding-right: 12px; }

  textarea{
    flex: 1;
    height: 100%;
    padding: 15px;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    resize: none;
    outline: none;
    box-sizing: border-box;
    background: #0e1219;
    color: var(--text);
  }

  /* PREVIEW */
  .preview-shell{
    flex: 1;
    background: #0a0d12;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow: auto;
  }

  .preview{
    width: 100%;
    height: 468px;
    border: none;
    border-radius: 6px;
    background: #fff;
    transition: width 0.25s ease;
  }
  .preview-shell.tablet .preview{ width: 700px; max-width: 100%; }
  .preview-shell.mobile .preview{ width: 380px; max-width: 100%; }

  /* BUTTONS */
  .btns{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
  }

  .app{
    padding: 11px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    transition: filter 0.15s ease;
  }
  .app:hover{ filter: brightness(1.1); }

  .green{ background: linear-gradient(135deg, #2fbfa0, #1f8f78); color: #06110e; }
  .gray{ background: #232b37; color: var(--text); }
  .gray:hover{ background: #2a3341; }