/* index.css — extracted from inline <style> blocks. Generated by scripts/h1-extract.mjs */
* { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: #0a0a0f;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
  }

  header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    border-bottom: 1px solid #1a1a2e;
  }

  header h1 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  header p {
    color: #666;
    margin-top: 0.4rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  .layout {
    display: flex;
    height: calc(100vh - 100px);
    overflow: hidden;
  }

  /* --- Sidebar --- */
  .sidebar {
    width: 300px;
    min-width: 300px;
    background: #0e0e18;
    border-right: 1px solid #1a1a2e;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .style-list {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1a1a2e;
  }

  .style-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: none;
    border: none;
    color: #888;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
  }

  .style-btn:hover { background: #14142a; color: #bbb; }
  .style-btn.active {
    background: linear-gradient(90deg, #1a1a3e, transparent);
    color: #c9a0ff;
    border-left: 3px solid #764ba2;
  }

  .controls {
    flex: 1;
    padding: 1rem 1.2rem;
    overflow-y: auto;
  }

  .controls h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    margin-bottom: 1rem;
  }

  .control-group {
    margin-bottom: 1.2rem;
  }

  .control-group label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.3rem;
  }

  .control-group label span { color: #c9a0ff; font-variant-numeric: tabular-nums; }

  input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #1a1a2e;
    border-radius: 2px;
    outline: none;
  }

  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #764ba2;
    cursor: pointer;
    border: 2px solid #0e0e18;
  }

  input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #764ba2;
    cursor: pointer;
    border: 2px solid #0e0e18;
  }

  .btn-row {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.2rem;
    border-top: 1px solid #1a1a2e;
  }

  .btn {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #2a2a4e;
    background: #12122a;
    color: #aaa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    letter-spacing: 0.03em;
  }

  .btn:hover { background: #1a1a3e; color: #ddd; border-color: #764ba2; }

  .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
  }

  .btn-primary:hover { opacity: 0.9; }

  /* --- Canvas area --- */
  .canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08080e;
    position: relative;
  }

  canvas {
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(118, 75, 162, 0.1);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .canvas-info {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.7rem;
    color: #333;
    letter-spacing: 0.05em;
  }

  /* Color input */
  input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid #2a2a4e;
    border-radius: 4px;
    width: 36px;
    height: 24px;
    background: none;
    cursor: pointer;
    padding: 0;
  }
  input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
  input[type="color"]::-webkit-color-swatch { border-radius: 2px; border: none; }

  .color-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
  }

  .color-row label {
    font-size: 0.8rem;
    color: #999;
    flex: 1;
  }

  select {
    background: #12122a;
    color: #ccc;
    border: 1px solid #2a2a4e;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    width: 100%;
    cursor: pointer;
    outline: none;
  }

  select:focus { border-color: #764ba2; }

  /* Compact mode when embedded in iframe */
  @media (max-height: 700px) {
    header { display: none; }
    .layout { height: 100vh; }
    .sidebar {
      display: grid;
      grid-template-columns: 120px 1fr;
      grid-template-rows: 1fr auto;
      width: 300px; min-width: 300px;
      overflow: hidden;
    }
    .style-list {
      grid-column: 1; grid-row: 1;
      padding: 0.2rem 0;
      border-bottom: none;
      overflow-y: auto;
    }
    .style-btn { padding: 0.2rem 0.6rem; font-size: 0.72rem; }
    .controls {
      grid-column: 2; grid-row: 1 / 3;
      padding: 0.4rem 0.6rem;
      overflow-y: auto;
      border-left: 1px solid #1a1a2e;
    }
    .controls h3 { margin-bottom: 0.3rem; font-size: 0.6rem; }
    .control-group { margin-bottom: 0.5rem; }
    .control-group label { font-size: 0.7rem; }
    .btn-row {
      grid-column: 1; grid-row: 2;
      flex-direction: column; gap: 0.3rem;
      padding: 0.4rem;
    }
    .btn { padding: 0.5rem 0.4rem; font-size: 0.75rem; }
  }

  /* Mobile responsive */
  @media (max-width: 768px) {
    header { padding: 1rem 0.5rem 0.5rem; }
    header h1 { font-size: 1.4rem; }
    .layout { flex-direction: column; height: auto; min-height: calc(100vh - 70px); }
    .sidebar { width: 100%; min-width: unset; max-height: 50vh; border-right: none; border-bottom: 1px solid #1a1a2e; }
    .style-list { display: flex; flex-wrap: wrap; gap: 0; padding: 0.3rem; }
    .style-btn { width: auto; padding: 0.5rem 0.8rem; font-size: 0.78rem; }
    .style-btn.active { border-left: none; border-bottom: 2px solid #764ba2; }
    .controls { padding: 0.6rem 0.8rem; }
    .btn-row { padding: 0.6rem 0.8rem; }
    .btn { padding: 0.5rem; min-height: 44px; }
    .canvas-area { padding: 0.5rem; min-height: 300px; }
    canvas { width: 100% !important; height: auto !important; max-width: 500px; }
  }

  @media (max-width: 480px) {
    header h1 { font-size: 1.1rem; letter-spacing: 0.08em; }
    .sidebar { max-height: 45vh; }
    .style-btn { padding: 0.4rem 0.6rem; font-size: 0.72rem; }
    .controls h3 { font-size: 0.7rem; }
    .control-group label { font-size: 0.75rem; }
    canvas { max-width: 100%; }
  }
