    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --bg: #1a1a2e; --panel: #16213e; --accent: #0f3460;
      --red: #e94560; --text: #e0e0e0; --muted: #8892a4;
    }
    body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif;
           font-size: 14px; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
    nav { background: var(--panel); border-bottom: 1px solid var(--accent); padding: 0 16px;
          height: 44px; display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
    nav a { color: var(--red); text-decoration: none; font-weight: 600; font-size: 14px; }
    nav a:hover { text-decoration: underline; }
    .nav-title { font-weight: 700; font-size: 16px; }
    .nav-status { margin-left: auto; font-size: 11px; color: var(--muted); }
    .main { display: flex; flex: 1; overflow: hidden; }
    .sidebar { width: 290px; background: var(--panel); border-right: 1px solid var(--accent);
               overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
    .canvas-area { flex: 1; position: relative; overflow: hidden; }
    h3 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
    label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
    input[type="text"], select {
      width: 100%; padding: 7px 10px; border: 1px solid var(--accent); border-radius: 6px;
      background: var(--bg); color: var(--text); font-size: 14px; outline: none;
      transition: border-color 0.2s;
    }
    input[type="text"] { font-size: 16px; font-weight: 700; letter-spacing: 0.06em; padding: 8px 10px; }
    input[type="text"]:focus, select:focus { border-color: var(--red); }
    .plate-number-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
    .plate-letter-select { width: 48px; text-align: center; font-size: 15px; font-weight: 700; padding: 7px 4px; }
    .plate-digits-input { width: 64px; text-align: center; font-size: 15px; letter-spacing: 2px; }
    .small-input { font-size: 13px !important; padding: 6px 8px !important; }
    .input-row { display: flex; gap: 8px; }
    .input-row input { flex: 1; }
    .input-row input.narrow { max-width: 80px; text-align: center; }
    .preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .preset-btn { background: var(--accent); border: 2px solid transparent; border-radius: 6px;
                  color: var(--text); font-size: 12px; font-weight: 600; padding: 8px 4px;
                  cursor: pointer; transition: all 0.15s; text-align: center; line-height: 1.5; }
    .preset-btn:hover { border-color: var(--red); }
    .preset-btn.active { border-color: var(--red); background: rgba(233,69,96,0.15); color: var(--red); }
    .preset-btn small { font-size: 10px; font-weight: 400; color: var(--muted); display: block; }
    .preset-btn.active small { color: inherit; }
    .slider-row { display: flex; align-items: center; gap: 8px; }
    .slider-row input[type="range"] {
      flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px;
      background: #0f3460; outline: none; cursor: pointer;
    }
    .slider-row input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
      background: var(--red); cursor: pointer;
    }
    .slider-row input[type="range"]::-moz-range-thumb {
      width: 16px; height: 16px; border-radius: 50%; border: none;
      background: var(--red); cursor: pointer;
    }
    .slider-val { min-width: 38px; text-align: right; color: var(--red); font-size: 13px; font-weight: 600; cursor: text; }
    .slider-val-input {
      width: 48px; background: rgba(233,69,96,0.1); border: none; border-radius: 4px;
      color: var(--red); font-size: 13px; font-weight: 600; text-align: right;
      outline: none; padding: 1px 4px; font-family: inherit; -moz-appearance: textfield;
    }
    .slider-val-input::-webkit-inner-spin-button,
    .slider-val-input::-webkit-outer-spin-button { display: none; }
    .btn { display: block; width: 100%; padding: 10px; border: none; border-radius: 8px;
           cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s; }
    .btn + .btn { margin-top: 6px; }
    .btn-primary { background: var(--red); color: #fff; }
    .btn-primary:hover { background: #ff5a73; }
    .btn-secondary { background: var(--accent); color: var(--text); }
    .btn-secondary:hover { background: #1a4a80; }
    .btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .separator { height: 1px; background: var(--accent); }
    .notice { font-size: 10px; color: var(--muted); line-height: 1.5; }
    .warn { color: #f59e0b; font-size: 10px; }
    /* Conditional panel visibility */
    .ru-panel, .eu-panel { display: none; }
    .ru-panel.visible, .eu-panel.visible { display: block; }
    /* Color legend dots */
    .legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
    .legend-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
    .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); flex-shrink: 0; }
    /* Checkbox styling */
    input[type="checkbox"] { accent-color: var(--red); margin-right: 6px; cursor: pointer; }
    .kc-label { display: flex; align-items: center; font-size: 13px; color: var(--text); cursor: pointer; }
    #keychainPanel { margin-top: 8px; }
    .author-link { color: #8892a4; text-decoration: underline; transition: color 0.15s; }
    .author-link:hover { color: #e94560; }
    .tri-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

    #view-tools {
      position: absolute; top: 14px; right: 14px;
      display: flex; flex-direction: column; gap: 8px;
      z-index: 5; user-select: none;
    }
    .view-btn {
      border: 1px solid #0f3460; background: rgba(18,33,62,0.88); color: #c8d4e6;
      border-radius: 8px; height: 30px; min-width: 40px; padding: 0 10px;
      font-size: 11px; font-weight: 700; letter-spacing: 0.4px; cursor: pointer; transition: all 0.2s;
    }
    .view-btn:hover { border-color: #e94560; color: #fff; }
    .view-btn.active { border-color: #e94560; background: rgba(233,69,96,0.18); color: #e94560; }
    #viewGrid { display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; justify-content: end; }
    #viewGrid [data-view="bottom"] { grid-column: 2; }
    #fitViewBtn { width: 132px; }
    #screenshotBtn { width: 132px; font-size: 14px; }
    #export-notice {
      position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%);
      background: #b8890a; color: #fff; padding: 8px 32px 8px 14px; border-radius: 6px;
      font-size: 12px; max-width: 360px; text-align: center; z-index: 20;
      white-space: normal; line-height: 1.4;
    }
    #export-notice-close {
      position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      background: none; border: none; color: #fff; cursor: pointer;
      font-size: 14px; line-height: 1; padding: 0;
    }
