      :root {
        /* Dark theme — matches Chirpy _dark.scss */
        --bg: rgb(27 27 30);
        --bg-secondary: #1e1e1e;
        --bg-tertiary: #252526;
        --border: #2e2f31;
        --text: rgb(175 176 177);
        --text-muted: #868686;
        --accent: rgb(138 180 248);
        --success: #2bcc2b;
        --error: #cd0202;
        --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
        --font-sans: "Source Sans 3", "Microsoft Yahei", sans-serif;
        --font-heading: "Lato", "Microsoft Yahei", sans-serif;
        --radius: 6px;
      }

      @media (prefers-color-scheme: light) {
        :root {
          /* Light theme — matches Chirpy _light.scss */
          --bg: white;
          --bg-secondary: #f6f8fa;
          --bg-tertiary: #f3f3f3;
          --border: #efefef;
          --text: #34343c;
          --text-muted: #757575;
          --accent: #0056b2;
          --success: #03b303;
          --error: #df3c30;
        }
      }

      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }

      body {
        background: var(--bg);
        color: var(--text);
        font-family: var(--font-sans);
        font-size: 16px;
        line-height: 1.5;
        min-height: 100vh;
      }

      header {
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 12px 20px;
      }

      header h1 {
        font-size: 18px;
        font-weight: 600;
        font-family: var(--font-mono);
      }

      header h1 span {
        color: var(--accent);
      }

      .layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: calc(100vh - 49px - 54px);
        overflow: hidden;
      }

      .panel {
        overflow-y: auto;
        padding: 20px;
      }
      .panel-left {
        border-right: 1px solid var(--border);
      }

      .section {
        margin-bottom: 20px;
      }

      .section-label {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        margin-bottom: 8px;
      }

      .method-url {
        display: flex;
        gap: 8px;
      }

      select,
      input[type="text"],
      input[type="number"],
      input[type="password"],
      input[type="search"],
      textarea {
        background: var(--bg-tertiary);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        color: var(--text);
        font-family: var(--font-sans);
        font-size: 14px;
        padding: 7px 10px;
        outline: none;
        transition: border-color 0.15s;
      }

      select:focus,
      input:focus,
      textarea:focus {
        border-color: var(--accent);
      }

      select {
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23656d76' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 28px;
      }

      #method-select {
        width: 110px;
        flex-shrink: 0;
        font-weight: 600;
      }
      #url-input {
        flex: 1;
      }

      .kv-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .kv-row {
        display: flex;
        gap: 6px;
        align-items: center;
      }
      .kv-row input {
        flex: 1;
        min-width: 0;
      }

      .btn-remove {
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        padding: 4px 6px;
        border-radius: var(--radius);
        flex-shrink: 0;
        transition:
          color 0.15s,
          background 0.15s;
      }
      .btn-remove:hover {
        color: var(--error);
        background: color-mix(in srgb, var(--error) 10%, transparent);
      }

      .btn-add {
        background: none;
        border: 1px dashed var(--border);
        border-radius: var(--radius);
        color: var(--text-muted);
        cursor: pointer;
        font-size: 14px;
        padding: 5px 10px;
        margin-top: 6px;
        transition:
          border-color 0.15s,
          color 0.15s;
        width: 100%;
        text-align: left;
      }
      .btn-add:hover {
        border-color: var(--accent);
        color: var(--accent);
      }

      .auth-fields {
        margin-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .auth-row {
        display: flex;
        gap: 6px;
      }
      .auth-row input {
        flex: 1;
      }
      .auth-row label {
        font-size: 16px;
        color: var(--text-muted);
        align-self: center;
        white-space: nowrap;
        min-width: 70px;
      }

      .body-type-row {
        margin-bottom: 8px;
      }

      textarea.body-input {
        width: 100%;
        min-height: 100px;
        resize: vertical;
        font-family: var(--font-mono);
        font-size: 16px;
      }
      textarea.body-input.json-error {
        border-color: var(--error);
      }

      #command-preview {
        width: 100%;
        min-height: 160px;
        background: var(--bg-tertiary);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        color: var(--accent);
        font-family: var(--font-mono);
        font-size: 14px;
        padding: 10px;
        resize: vertical;
        outline: none;
        white-space: pre;
        overflow-x: auto;
      }

      .action-row {
        display: flex;
        gap: 8px;
        margin-top: 8px;
      }

      .btn {
        border: none;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        padding: 7px 16px;
        transition:
          background 0.15s,
          color 0.15s,
          border-color 0.15s;
      }

      .btn-copy {
        background: var(--bg-tertiary);
        border: 1px solid var(--border);
        color: var(--text-muted);
      }
      .btn-copy:hover {
        border-color: var(--accent);
        color: var(--accent);
      }
      .btn-copy.copied {
        color: var(--success);
        border-color: var(--success);
      }

      .hidden {
        display: none !important;
      }

      .credentials-note {
        font-size: 12px;
        color: var(--text-muted);
        margin-top: 6px;
      }

      /* ── Options panel ────────────────────────────────────────────────────── */

      .opts-search {
        width: 100%;
        margin-bottom: 8px;
        /* search icon — dark theme colour (#868686) */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23868686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 9px center;
        padding-left: 30px !important;
      }

      /* suppress the native webkit search-cancel button */
      .opts-search::-webkit-search-cancel-button {
        display: none;
      }

      @media (prefers-color-scheme: light) {
        /* search icon — light theme colour (#757575) */
        .opts-search {
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
        }
      }

      .opts-list {
        display: flex;
        flex-direction: column;
        gap: 1px;
        max-height: 340px;
        overflow-y: auto;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 4px;
        background: var(--bg-secondary);
      }

      .opt-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 6px;
        border-radius: 4px;
        min-height: 28px;
        transition: background 0.1s;
      }
      .opt-row:hover {
        background: var(--bg-tertiary);
      }
      .opt-row.opt-checked {
        background: color-mix(in srgb, var(--accent) 8%, transparent);
      }
      .opt-row.opt-checked:hover {
        background: color-mix(in srgb, var(--accent) 14%, transparent);
      }
      .opt-row.opt-dimmed {
        opacity: 0.4;
      }
      .opt-row.opt-dimmed .opt-label {
        cursor: default;
      }

      /* Custom checkbox */
      .opt-row input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 15px;
        height: 15px;
        border: 1.5px solid var(--border);
        border-radius: 3px;
        background: var(--bg-tertiary);
        cursor: pointer;
        flex-shrink: 0;
        margin: 0;
        position: relative;
        transition:
          background 0.1s,
          border-color 0.1s;
      }
      .opt-row input[type="checkbox"]:checked {
        background: var(--accent);
        border-color: var(--accent);
      }
      .opt-row input[type="checkbox"]:checked::after {
        content: "";
        position: absolute;
        left: 3px;
        top: 1px;
        width: 5px;
        height: 8px;
        border: 1.5px solid var(--bg);
        border-top: none;
        border-left: none;
        transform: rotate(45deg);
      }
      .opt-row input[type="checkbox"]:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 1px;
      }
      .opt-row.opt-dimmed input[type="checkbox"] {
        cursor: not-allowed;
      }

      .opt-label {
        font-family: var(--font-mono);
        font-size: 12px;
        color: var(--text);
        cursor: pointer;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        user-select: none;
      }
      .opt-short {
        color: var(--text-muted);
        margin-left: 2px;
      }

      .opt-value-input {
        font-family: var(--font-mono);
        font-size: 12px;
        padding: 2px 6px;
        height: 22px;
        width: 110px;
        flex-shrink: 0;
      }

      .opt-info-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 12px;
        padding: 2px 4px;
        border-radius: 3px;
        flex-shrink: 0;
        line-height: 1;
        opacity: 0.6;
        transition:
          opacity 0.1s,
          color 0.1s;
      }
      .opt-info-btn:hover {
        opacity: 1;
        color: var(--accent);
      }

      /* ── Modal ────────────────────────────────────────────────────────────── */

      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
      }

      .modal {
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 8px;
        max-width: 600px;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        padding: 20px;
        position: relative;
      }

      .modal-title {
        font-family: var(--font-mono);
        font-size: 16px;
        font-weight: 600;
        color: var(--accent);
        margin-bottom: 12px;
      }

      .modal-protocols {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        margin-bottom: 10px;
      }

      .proto-tag {
        font-size: 12px;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 3px;
        background: color-mix(in srgb, var(--accent) 15%, transparent);
        color: var(--accent);
        border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
      }

      .modal-help {
        font-size: 14px;
        color: var(--text);
        line-height: 1.6;
        white-space: pre-wrap;
        margin-bottom: 12px;
      }

      .modal-examples {
        margin-top: 10px;
      }

      .modal-examples-label {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-muted);
        margin-bottom: 6px;
      }

      .modal-example {
        background: var(--bg-tertiary);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-family: var(--font-mono);
        font-size: 12px;
        color: var(--accent);
        padding: 8px 10px;
        margin-bottom: 6px;
        white-space: pre;
        overflow-x: auto;
      }

      .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        padding: 4px 6px;
        border-radius: var(--radius);
        transition: color 0.15s;
      }
      .modal-close:hover {
        color: var(--text);
      }

      @media (max-width: 768px) {
        .layout {
          grid-template-columns: 1fr;
          height: auto;
          overflow: visible;
        }
        .panel-left {
          border-right: none;
          border-bottom: 1px solid var(--border);
        }
      }

      footer {
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        padding: 15px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        vertical-align: center;
        font-size: 15px;
        color: var(--text-muted);
      }

      footer a {
        color: var(--accent);
        text-decoration: none;
      }
      footer a:hover {
        text-decoration: underline;
      }
