  .workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 288px 1fr 272px;
    gap: 0;
    min-height: 0;
  }

  .panel {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
  }

  .section-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text3);
    margin-bottom: 10px;
  }

  .hint-text {
    font-size: 12px;
    color: var(--text3);
    margin-top: 8px;
    line-height: 1.65;
  }

  .hint-text--warn {
    color: #ef4444;
    font-weight: 600;
  }

  .mode-row {
    display: flex;
    gap: 8px;
  }

  .mode-btn {
    flex: 1;
    padding: 10px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-weight: 500;
    font-size: 13px;
  }
  .mode-btn:hover {
    border-color: var(--border-strong);
    color: var(--text);
  }
  .mode-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
  }

  .upload-zone {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 30px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
    background: var(--surface-muted);
  }
  .upload-zone:hover,
  .upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 4px var(--accent-glow);
  }
  .upload-zone svg {
    width: 32px;
    height: 32px;
    stroke: var(--text3);
    margin-bottom: 10px;
    transition: stroke 0.2s var(--ease);
  }
  .upload-zone:hover svg,
  .upload-zone.drag-over svg { stroke: var(--accent); }
  .upload-zone p { font-size: 13px; color: var(--text2); line-height: 1.65; }
  .upload-zone em { font-style: normal; color: var(--accent); font-weight: 500; }
  #file-input { display: none; }

  .filename-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }
  .filename-row input {
    flex: 1;
    padding: 8px 10px;
    font-family: var(--mono);
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  }
  .filename-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
  }
  .filename-row span {
    font-size: 12px;
    color: var(--text3);
    white-space: nowrap;
    font-family: var(--mono);
  }

  .b64-input,
  .b64-output {
    width: 100%;
    padding: 10px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    resize: vertical;
  }
  .b64-input:focus,
  .b64-output:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
  }

  .btn-primary {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
    box-shadow: 0 2px 8px var(--accent-glow);
  }
  .btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px var(--accent-glow);
  }
  .btn-primary:active:not(:disabled) { transform: translateY(1px); }
  .btn-primary:disabled {
    background: var(--surface2);
    color: var(--text3);
    cursor: not-allowed;
    box-shadow: none;
  }

  .canvas-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 32px;
    gap: 16px;
    background-color: #e8eaef;
    background-image:
      linear-gradient(45deg, #dfe2e8 25%, transparent 25%),
      linear-gradient(-45deg, #dfe2e8 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #dfe2e8 75%),
      linear-gradient(-45deg, transparent 75%, #dfe2e8 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    position: relative;
    overflow: hidden;
  }

  .preview-wrap {
    z-index: 1;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-width: min(860px, 100%);
  }
  .preview-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
  }

  .empty-state { z-index: 1; text-align: center; padding: 24px; }
  .empty-state svg { width: 52px; height: 52px; stroke: var(--border-strong); margin-bottom: 14px; }
  .empty-state p { font-size: 14px; color: var(--text3); }

  .meta-badge {
    z-index: 1;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text2);
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }

  .output-panel {
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 22px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .empty-output {
    padding: 14px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: var(--text3);
    font-size: 13px;
    text-align: center;
  }

  .output-preview {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-muted);
  }

  .output-preview img {
    display: block;
    width: 100%;
    height: auto;
  }

  .btn-dl-all {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    color: var(--text2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease);
  }
  .btn-dl-all:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
  }

  .info-row {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.02em;
    display: flex;
    justify-content: space-between;
  }

  @media (max-width: 960px) {
    .workspace {
      grid-template-columns: 1fr;
      grid-template-rows: auto 1fr auto;
    }
    .panel {
      border-right: none;
      border-bottom: 1px solid var(--border);
      max-height: none;
    }
    .output-panel {
      border-left: none;
      border-top: 1px solid var(--border);
      max-height: 320px;
    }
    .canvas-area { min-height: 360px; }
  }
