  :root {
    --blue--50: #eff6ff;
    --blue--100: #dbeafe;
    --blue--200: #bfdbfe;
    --blue--400: #60a5fa;
    --blue--500: #3b82f6;
    --blue--600: #2563eb;
    --blue--700: #1d4ed8;
    --blue--900: #1e3a8a;
    --gray--50: #f9fafb;
    --gray--100: #f3f4f6;
    --gray--200: #e5e7eb;
    --gray--300: #d1d5db;
    --gray--400: #9ca3af;
    --gray--500: #6b7280;
    --gray--700: #374151;
    --gray--900: #111827;
    --white-100: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
  }
 
  .app-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
 
  .row-card {
    background: var(--white-100);
    border: 1px solid var(--gray--200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: visible;
    position: relative;
  }
  .row-card.code-card { overflow: hidden; }
 
  .row-card-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray--100);
    display: flex; align-items: center; gap: 10px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--white-100);
  }
  .row-card-header h2 {
    font-family: sans-serif;
    font-size: 14px; font-weight: 600; color: var(--gray--700);
    flex: 1;
	margin: 0;
  }
 
  .section-badge {
    font-size: 10px; font-weight: 700; padding: 2px 8px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .3px;
  }
  .badge-blue { background: var(--blue--100); color: var(--blue--700); }
 
  .row-card.preview-card {
    overflow: visible;
    position: relative;
    z-index: 8;
  }
  .row-card.preview-card .row-card-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .preview-frame {
    padding: 16px;
    background: repeating-conic-gradient(var(--gray--100) 0% 25%, var(--white-100) 0% 50%) 0 0 / 20px 20px;
    display: flex;
    align-items: flex-start;
    overflow: visible;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  #preview-container { width: 100%; overflow: visible; }
  .preview-frame-wrapper { overflow: visible; }
  .preview-sizer { transition: width .3s ease; margin: 0 auto; overflow: visible; }
 
  .ctrl-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray--200);
    padding: 0 4px;
    background: var(--white-100);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    gap: 2px;
  }
  .ctrl-tabs button {
    padding: 11px 18px;
    font-family: sans-serif;
    font-size: 13px; font-weight: 600;
    color: var(--gray--500);
    background: none; border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    white-space: nowrap;
  }
  .ctrl-tabs button.active { color: var(--blue--600); border-bottom-color: var(--blue--600); }
  .ctrl-tabs button:hover:not(.active) { color: var(--gray--700); }
 
  .tab-panel { display: none; padding: 16px 20px 20px; }
  .tab-panel.active { display: block; }
 
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
  }

  .cards-grid.design-grid {
    grid-template-columns: 1fr 320px;
  }
 
  .ctrl-card {
    border: 1px solid var(--gray--200);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
  }
  .ctrl-card-title {
    background: var(--gray--50);
    padding: 8px 13px;
    font-size: 11px; font-weight: 700;
    color: var(--gray--700); text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid var(--gray--200);
  }
  .ctrl-card-body { padding: 12px 13px; }
 
  .ctrl-row {
    display: flex; align-items: center;
    gap: 8px; margin-bottom: 10px; min-width: 0;
  }
  .ctrl-row:last-child { margin-bottom: 0; }
  .ctrl-label { font-size: 12px; color: var(--gray--500); width: 90px; flex-shrink: 0; font-weight: 500; }
  .ctrl-label.full { width: auto; flex: 1; }
 
  input[type="color"] {
    width: 32px; height: 28px; padding: 2px; border: 1px solid var(--gray--300);
    border-radius: var(--radius-sm); cursor: pointer; background: none;
  }
  input[type="range"] {
    flex: 1; min-width: 0; accent-color: var(--blue--500);
    height: 4px; cursor: pointer;
  }
  .range-val {
    font-size: 11px; font-weight: 600; color: var(--blue--600);
    min-width: 34px; width: 34px; flex-shrink: 0; text-align: right; white-space: nowrap;
  }
  select, input[type="text"], input[type="url"] {
    flex: 1; padding: 6px 9px;
    border: 1px solid var(--gray--300); border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--gray--900);
    background: var(--white-100);
    transition: border .15s;
    outline: none;
  }
  select:focus, input[type="text"]:focus, input[type="url"]:focus {
    border-color: var(--blue--400); box-shadow: 0 0 0 3px var(--blue--100);
  }
 
  .radio-group { display: flex; gap: 4px; }
  .radio-group label {
    flex: 1; text-align: center;
    padding: 5px 4px;
    font-size: 11px; font-weight: 500;
    border: 1px solid var(--gray--300);
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--gray--500);
    transition: all .15s;
  }
  .radio-group input { display: none; }
  .radio-group input:checked + label {
    background: var(--blue--600); color: white; border-color: var(--blue--600);
  }
 
  .toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
  .toggle input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; inset: 0;
    background: var(--gray--300); border-radius: 20px; cursor: pointer;
    transition: background .2s;
  }
  .toggle-slider::before {
    content: ''; position: absolute;
    width: 14px; height: 14px;
    background: white; border-radius: 50%;
    top: 3px; left: 3px; transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
  }
  .toggle input:checked ~ .toggle-slider { background: var(--blue--500); }
  .toggle input:checked ~ .toggle-slider::before { transform: translateX(16px); }
 
  .color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-width: 0; }
  .color-row:last-child { margin-bottom: 0; }
  .color-label { font-size: 12px; color: var(--gray--500); font-weight: 500; width: 90px; flex-shrink: 0; }
  .color-input-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
  .color-hex { flex: 1; min-width: 0; font-size: 11px; font-family: monospace; letter-spacing: .5px; }
 
  .ham-picker {
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  .ham-opt {
    width: 48px; height: 40px;
    border: 1px solid var(--gray--200); border-radius: var(--radius-sm);
    background: var(--white-100); cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 0; transition: border-color .15s, box-shadow .15s, background .15s;
    position: relative; flex-shrink: 0; gap: 0;
  }
  .ham-opt span {
    display: block;
    background: var(--gray--500);
    border-radius: 1px;
    flex-shrink: 0;
  }
  .ham-opt.active { border-color: var(--blue--500); box-shadow: 0 0 0 2px var(--blue--200); background: var(--blue--50); }
  .ham-opt.active span { background: var(--blue--600); }
  .ham-opt:hover:not(.active) { border-color: var(--blue--300); background: var(--gray--50); }

  .ham-opt[data-style="bars"] span { width: 18px; height: 2px; margin: 2px 0; }

  .ham-opt[data-style="thick"] span { width: 18px; height: 3px; margin: 2px 0; }

  .ham-opt[data-style="thin"] span { width: 18px; height: 1px; margin: 3px 0; border-radius: 0; }

  .ham-opt[data-style="taper"] span { height: 2px; margin: 2px 0; }
  .ham-opt[data-style="taper"] span:nth-child(1) { width: 18px; }
  .ham-opt[data-style="taper"] span:nth-child(2) { width: 13px; }
  .ham-opt[data-style="taper"] span:nth-child(3) { width: 8px; }

  .ham-opt[data-style="dots"] { flex-direction: row; gap: 3px; }
  .ham-opt[data-style="dots"] span { width: 4px; height: 4px; border-radius: 50%; margin: 0; }

  .ham-opt[data-style="bento"] { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 0 12px; }
  .ham-opt[data-style="bento"] span { width: 7px; height: 7px; border-radius: 1px; margin: 0; }
 

  .menu-item-list { list-style: none; }
  .menu-item-row {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--gray--200);
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
    background: var(--white-100);
    cursor: grab;
    transition: box-shadow .15s;
    user-select: none;
  }
  .menu-item-row.is-sub {
    margin-left: 22px;
    background: var(--blue--50);
    border-color: var(--blue--200);
  }
  .menu-item-row:hover { box-shadow: var(--shadow-sm); }
  .menu-item-row.dragging { opacity: .5; box-shadow: var(--shadow-md); }
  .drag-handle { color: var(--gray--400); cursor: grab; font-size: 13px; flex-shrink: 0; }
  .item-label-text { flex: 1; font-size: 12px; font-weight: 500; color: var(--gray--700); }
  .item-actions { display: flex; gap: 4px; }
  .btn-icon {
    width: 24px; height: 24px; border: none;
    border-radius: 5px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; transition: all .15s;
  }
  .btn-icon.del { background: #fee2e2; color: #ef4444; }
  .btn-icon.del:hover { background: #ef4444; color: white; }
  .btn-icon.sub { background: var(--blue--100); color: var(--blue--600); font-size: 10px; }
  .btn-icon.sub:hover { background: var(--blue--600); color: white; }
  .btn-icon.unsub { background: var(--gray--100); color: var(--gray--500); font-size: 10px; }
  .btn-icon.unsub:hover { background: var(--gray--400); color: white; }
 
  .add-item-form {
    border: 1px solid var(--gray--200);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--gray--50);
  }
  .add-item-form h4 { font-size: 11px; font-weight: 600; color: var(--gray--500); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; }
  .add-item-form .form-row { display: flex; gap: 6px; margin-bottom: 7px; }
  .add-item-form input { flex: 1; }
  .btn-add {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 14px;
    background: var(--blue--600); color: white;
    border: none; border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background .15s; width: 100%;
    justify-content: center;
  }
  .btn-add:hover { background: var(--blue--700); }
 
  .logo-upload-zone {
    border: 2px dashed var(--blue--300);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: var(--blue--50);
    transition: all .2s;
    margin-bottom: 10px;
  }
  .logo-upload-zone:hover { background: var(--blue--100); border-color: var(--blue--500); }
  .logo-upload-zone input { display: none; }
  .logo-upload-zone .upload-icon { font-size: 24px; margin-bottom: 4px; }
  .logo-upload-zone p { font-size: 12px; color: var(--blue--700); font-weight: 500; }
  .logo-upload-zone p small { color: var(--blue--500); font-weight: 400; }
  .logo-preview-wrap { display: none; }
  .logo-preview-wrap img { max-width: 100%; max-height: 70px; border-radius: var(--radius-sm); border: 1px solid var(--gray--200); }
  .btn-remove-logo {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; margin-top: 8px;
    background: #fee2e2; color: #ef4444;
    border: 1px solid #fecaca; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 600; cursor: pointer;
  }
 
  .code-toolbar {
    display: flex;
    align-items: stretch;
    padding: 0;
	border-bottom: 1px solid var(--gray--200);
  }
  .code-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 12px 0;
    flex: 1;
  }

  .code-tab-btn {
    padding: 7px 16px; border: none;
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
    cursor: pointer; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all .15s; background: var(--gray--100); color: var(--gray--500);
  }
  .code-tab-btn.active { background: var(--blue--600); color: white; }
  .code-tab-btn:hover:not(.active) { background: var(--gray--200); color: var(--gray--700); }
 
  .code-panel { display: none; padding: 12px 16px 16px; }
  .code-panel.active { display: block; }
 
  .code-actions {
    display: flex; gap: 8px; margin-bottom: 10px;
    justify-content: flex-end;
  }
  .btn-action {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 14px;
    border: 1px solid var(--gray--300); border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
    cursor: pointer; background: var(--white-100); color: var(--gray--700);
    transition: all .15s;
  }
  .btn-action:hover { background: var(--gray--100); }
  .btn-action.primary {
    background: var(--blue--600); color: white; border-color: var(--blue--600);
  }
  .btn-action.primary:hover { background: var(--blue--700); }
 
  .device-btn {
    padding: 4px 12px; border: 1px solid var(--gray--200);
    border-radius: var(--radius-sm); font-size: 11px; font-weight: 500;
    cursor: pointer; background: var(--white-100); color: var(--gray--500);
    transition: all .15s;
  }
  .device-btn.active, .device-btn:hover { background: var(--blue--600); color: white; border-color: var(--blue--600); }

  .design-instructions {
    background: var(--blue--50);
    border: 1px solid var(--blue--200);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-top: 20px;
  }
  .design-instructions p {
    font-size: 11px; color: var(--blue--700); line-height: 1.7;
    margin: 0;
  }
  .design-instructions p + p { margin-top: 4px; }
 
  .about-section {
    background: var(--white-100);
    border: 1px solid var(--gray--200);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
	margin-top:20px;
  }
  .about-section h2 {
    font-family: sans-serif;
    font-size: 20px; font-weight: 700; color: var(--gray--900);
    margin-bottom: 12px;
  }
  .about-section h3 {
    font-family: sans-serif;
    font-size: 16px; font-weight: 600; color: var(--gray--800);
    margin: 20px 0 6px;
  }
  .about-section p {
    color: var(--gray--500); line-height: 1.7;
  }
  .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
  }
  .about-card {
    border: 1px solid var(--gray--200);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--gray--50);
  }
  .about-card-icon {
    font-size: 20px; margin-bottom: 8px;
  }
  .about-card h4 {
    font-family: sans-serif;
    font-size: 16px; font-weight: 600; color: var(--gray--800);
    margin-bottom: 5px;
  }
  .about-card p {
    font-size: 14px; color: var(--gray--500); line-height: 1.6;
  }
 