:root {
  --bg: #030503;
  --panel: #080a06;
  --panel-soft: #10120b;
  --line: #ffffff;
  --line-soft: rgba(255, 255, 255, 0.36);
  --gold: #f2d572;
  --gold-deep: #a78b37;
  --olive: #1e2d1d;
  --olive-2: #2b4428;
  --danger: #a93636;
  --text: #f6f1dc;
  --muted: #cfc39c;
  --bad: #ff4242;
  --ok: #f2d572;
  --paper: #ffffff;
  --paper-ink: #101010;
  --paper-line: rgba(255, 255, 255, 0.92);
  --selected: #def8d3;
  --selected-line: #bfeaa9;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

.plugin-shell {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  padding: 0 12px 18px;
  background:
    radial-gradient(circle at 0 260px, rgba(44, 78, 72, 0.28), transparent 115px),
    linear-gradient(90deg, rgba(223, 191, 80, 0.035), transparent 32%),
    var(--bg);
}

.plugin-shell::-webkit-scrollbar {
  width: 11px;
}

.plugin-shell::-webkit-scrollbar-track {
  background: #3b3b3b;
}

.plugin-shell::-webkit-scrollbar-thumb {
  background: #858585;
  border: 2px solid #3b3b3b;
}

.topbar {
  margin: 0 -12px;
  height: 30px;
  line-height: 30px;
  padding: 0 12px;
  background: #2f2f2f;
  color: #e8e8e8;
  overflow: hidden;
  white-space: nowrap;
}

.tab-title {
  height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  position: relative;
  display: block;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

.brand-logo {
  display: block;
  width: 220px;
  max-width: 72%;
  height: auto;
  margin: 0 auto 10px;
}

.brand-wordmark {
  display: block;
  max-width: 72%;
  margin: 0 auto 10px;
  color: var(--gold);
  font-size: 24px;
  font-weight: 800;
  line-height: 30px;
  text-align: center;
}

.brand .version {
  position: absolute;
  top: 22px;
  right: 2px;
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}

.brand p {
  margin: 0;
  color: var(--muted);
  letter-spacing: 3px;
  font-size: 12px;
}

.section {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-line);
}

.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 22px;
  margin: 0 0 8px;
}

.section-line strong,
.section-line span {
  display: block;
  min-width: 0;
}

.section-line strong {
  color: var(--text);
  font-weight: 700;
}

.section-line span {
  text-align: right;
  font-weight: 700;
}

.state-bad {
  color: var(--bad);
}

.state-ok {
  color: var(--ok);
}

.url-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.url-row .url-label,
.url-row input,
.url-row .connect-action {
  display: block;
  height: 38px;
  border: 1px solid var(--line);
}

.url-row .url-label {
  flex: 0 0 78px;
  line-height: 36px;
  text-align: center;
  background: var(--gold-deep);
  color: #070806;
  font-weight: 700;
}

.url-row input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 8px;
  padding: 0 8px;
  line-height: 36px;
  background: #191919;
  color: #fff;
}

.url-row .connect-action {
  flex: 0 0 78px;
  padding: 0;
  line-height: 36px;
  background: #080908;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.major-tab-section {
  padding: 10px 0 8px;
}

.major-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 58px;
}

.major-tab {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 58px;
  padding: 4px 0 3px;
  border: 0;
  background: transparent;
  color: #8b909b;
  text-align: center;
  font-weight: 700;
  box-sizing: border-box;
  overflow: visible;
  white-space: nowrap;
  cursor: pointer;
}

.major-tab.active {
  background: transparent;
  color: #38d568;
}

.major-icon {
  display: block;
  width: 100%;
  height: 26px;
  line-height: 26px;
  margin: 0 auto 2px;
  font-size: 21px;
  font-weight: 800;
  text-align: center;
}

.major-label {
  display: block;
  width: 100%;
  height: 18px;
  line-height: 18px;
  font-size: 11px;
  overflow: visible;
  white-space: nowrap;
  text-align: center;
}

.workbench {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 10px;
  border: 1px solid var(--paper-line);
  background: rgba(0, 0, 0, 0.18);
}

.category-tabs {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font-size: 0;
  line-height: 0;
}

.category-tab {
  display: inline-block;
  width: 32%;
  min-width: 0;
  height: 48px;
  line-height: 46px;
  margin: 0 2% 8px 0;
  padding: 0 8px;
  border: 1px solid var(--paper);
  border-radius: 16px;
  background: var(--paper);
  color: var(--paper-ink);
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: top;
}

.category-tab:nth-child(3n) {
  margin-right: 0;
}

.category-tab.active {
  background: var(--selected);
  color: var(--paper-ink);
  border-color: var(--selected-line);
}

.feature-grid {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--paper);
  border-radius: 12px;
  background: var(--paper);
  font-size: 0;
  line-height: 0;
}

.feature-button {
  display: inline-block;
  width: 31.5%;
  min-width: 0;
  height: 72px;
  line-height: 18px;
  margin: 0 2.75% 10px 0;
  padding: 8px 5px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: var(--paper);
  color: var(--paper-ink);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  cursor: pointer;
  vertical-align: top;
}

.feature-button:nth-child(3n) {
  margin-right: 0;
}

.feature-button.active {
  background: var(--selected);
  color: var(--paper-ink);
  border-color: var(--selected-line);
}

.feature-button.wide {
  width: 100%;
}

.light-directory-grid .light-feature-card {
  height: 72px;
  line-height: 18px;
  padding: 8px 5px;
  text-align: center;
}

.feature-mini-icon {
  display: block;
  width: 100%;
  height: 20px;
  line-height: 20px;
  color: #111;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.feature-button.active .feature-mini-icon {
  color: #1ca64d;
}

.feature-label {
  display: block;
  width: 100%;
  min-width: 0;
  color: inherit;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.feature-grid .empty-custom {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: var(--paper);
  color: var(--paper-ink);
  line-height: 22px;
  text-align: center;
}

.minor-title {
  display: block;
  height: 22px;
  line-height: 22px;
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
}

.param-panel,
.param-card,
.progress-card,
.result-section {
  display: block;
  width: 100%;
}

.param-card {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--paper-line);
  background: rgba(7, 8, 5, 0.86);
}

.param-card label,
.panel-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
  line-height: 18px;
}

textarea,
input,
select {
  border: 1px solid var(--paper-line);
  background: #191919;
  color: #fff;
}

.prompt-card textarea,
.custom-editor textarea {
  display: block;
  width: 100%;
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  margin: 0;
  padding: 8px;
  resize: none;
  overflow-y: auto;
}

.custom-editor textarea {
  height: 122px;
  min-height: 122px;
  max-height: 122px;
}

.field-stack {
  padding: 10px;
}

.reference-preview {
  display: block;
  width: 100%;
  height: 116px;
  line-height: 114px;
  margin: 0 0 8px;
  border: 1px solid var(--paper-line);
  background: linear-gradient(90deg, rgba(242, 213, 114, 0.08), rgba(8, 12, 7, 0.9));
  text-align: center;
  overflow: hidden;
}

.reference-preview img {
  display: block;
  width: 100%;
  height: 116px;
  object-fit: contain;
}

.reference-preview span {
  display: inline-block;
  max-width: 92%;
  max-height: 40px;
  line-height: 20px;
  color: var(--muted);
  overflow: hidden;
  text-align: center;
  vertical-align: middle;
}

.reference-controls,
.button-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 42px;
}

.button-row.action-row {
  display: flex;
  height: auto;
}

.button-row.action-row .panel-action + .panel-action {
  margin-left: 8px;
}

.button-row.action-row .panel-action {
  flex: 1 1 0;
  width: auto;
}

.reference-controls .panel-action,
.button-row .panel-action {
  display: block;
  min-width: 0;
  height: 42px;
  line-height: 40px;
  padding: 0 4px;
  border: 1px solid var(--paper-line);
  text-align: center;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-action {
  cursor: default;
  user-select: none;
}

.hidden {
  display: none !important;
}

.solid-button {
  background: var(--selected);
  color: #050604;
}

.outline-button {
  background: #060806;
  color: #fff;
}

.danger-button {
  background: var(--danger);
  color: #fff;
}

.is-disabled {
  opacity: 0.42;
}

.action-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-hint,
.hint {
  display: none;
}

.slider-row {
  position: relative;
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 0 0 0 0;
}

.slider-row label {
  position: absolute;
  left: 0;
  top: 0;
  width: 82px;
  height: 42px;
  line-height: 42px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-row .slider-value {
  position: absolute;
  left: 88px;
  top: 6px;
  width: 58px;
  height: 30px;
  padding: 0 6px;
  line-height: 28px;
  text-align: center;
}

.xhn-slider {
  position: relative;
  display: block;
  height: 42px;
  margin-left: 158px;
  margin-right: 0;
}

.xhn-slider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 4px;
  background: #4a4a4a;
}

.xhn-slider-fill {
  position: absolute;
  left: 0;
  top: 20px;
  height: 4px;
  background: var(--selected);
}

.xhn-slider-thumb {
  position: absolute;
  top: 14px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border: 2px solid var(--selected-line);
  background: #1c1c1c;
}

.param-grid {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.param-grid label {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px 0 0;
  font-weight: 700;
}

.param-grid input {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 6px;
  padding: 0 8px;
}

.select-grid,
.chips,
.checkbox-grid {
  display: block;
  width: 100%;
  font-size: 0;
}

.select-grid {
  display: block;
}

.select-grid select,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip {
  display: inline-block;
  width: calc(50% - 5px);
  height: 34px;
  line-height: 32px;
  margin: 0 10px 8px 0;
  padding: 0 6px;
  border: 1px solid var(--paper-line);
  background: #161616;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.select-grid select,
.select-grid .panel-action {
  display: inline-block;
  width: 47%;
  min-width: 0;
  max-width: 47%;
  margin: 0 10px 8px 0;
}

.select-grid select + select {
  margin-right: 0;
}

.select-grid #refreshModelsInlineBtn {
  display: block;
  width: 100%;
  margin-right: 0;
}

.select-grid select:nth-child(2n),
.select-grid .panel-action:nth-child(2n),
.chips .option-chip:nth-child(2n),
.chips .strength-chip:nth-child(2n) {
  margin-right: 0;
}

.option-chip.active,
.strength-chip.active {
  background: var(--selected);
  color: var(--paper-ink);
  border-color: var(--selected-line);
}

.check-item {
  display: inline-block;
  width: 50%;
  height: 26px;
  line-height: 26px;
  font-size: 12px;
  color: var(--text);
}

.identity-lock-card {
  padding-top: 8px;
  padding-bottom: 8px;
}

.identity-check-row {
  width: 100%;
  height: 24px;
  line-height: 24px;
  font-weight: 700;
  color: var(--gold);
}

.feature-note-card strong,
.feature-note-card span {
  display: block;
}

.feature-note-card span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 18px;
}

.progress-card {
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--paper-line);
  background: #020302;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 20px;
}

.progress-head span,
.progress-head strong {
  display: block;
}

.progress-head strong {
  text-align: right;
}

.progress-track {
  display: block;
  width: 100%;
  height: 4px;
  margin: 6px 0 14px;
  background: #303030;
  overflow: hidden;
}

#progressBar {
  width: 0;
  height: 4px;
  background: var(--selected);
}

.log-line {
  min-height: 58px;
  padding-top: 10px;
  border-top: 1px solid var(--paper-line);
  color: #e7d8a1;
  line-height: 19px;
  text-align: center;
}

.log-line.error {
  color: #ff6767;
}

.result-list {
  display: block;
  width: 100%;
}

.result-list.empty {
  display: none;
}

.result-item {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--paper-line);
}

.result-item img {
  display: block;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.result-item span,
.result-item div {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
  color: var(--text);
  word-break: break-all;
}

.result-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 370px) {
  .plugin-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand-logo {
    max-width: 78%;
  }

  .category-tabs {
    width: 100%;
    min-width: 0;
    padding-right: 0;
  }

  .feature-grid {
    padding: 10px;
  }

  .feature-button {
    width: 31.5%;
    margin-right: 2.75%;
  }

  .slider-row label {
    width: 72px;
  }

  .slider-row .slider-value {
    left: 78px;
    width: 54px;
  }

  .xhn-slider {
    margin-left: 144px;
  }
}

@media (max-width: 430px) {
  .plugin-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .topbar {
    margin-left: -10px;
    margin-right: -10px;
  }

  .brand {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .brand-wordmark {
    font-size: 22px;
  }

  .brand p {
    letter-spacing: 2px;
  }

  .url-row .url-label {
    flex-basis: 68px;
    font-size: 12px;
  }

  .url-row input {
    margin-left: 6px;
    margin-right: 6px;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }

  .url-row .connect-action {
    flex-basis: 64px;
    font-size: 12px;
  }

  .major-tab {
    height: 54px;
  }

  .major-icon {
    height: 24px;
    line-height: 24px;
    font-size: 19px;
  }

  .major-label {
    font-size: 10px;
  }

  .category-tabs {
    width: 100%;
    min-width: 0;
    padding-right: 0;
  }

  .category-tab {
    height: 44px;
    line-height: 17px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 13px;
  }

  .feature-grid {
    padding: 10px;
  }

  .feature-button {
    width: 31.5%;
    min-height: 0;
    height: 66px;
    line-height: 18px;
    margin-right: 2.75%;
    font-size: 12px;
  }

  .button-row.action-row .panel-action + .panel-action {
    margin-left: 6px;
  }

  .reference-controls .panel-action,
  .button-row .panel-action {
    font-size: 12px;
  }
}

@media (max-width: 370px) {
  .category-tabs {
    width: 100%;
    min-width: 0;
  }

  .feature-button {
    width: 31.5%;
    margin-right: 2.75%;
  }
}

/* v0.2.19 visual skin: soft glass workspace, no workflow changes */
:root {
  --bg: #151922;
  --panel: #1d2230;
  --panel-soft: #252b3a;
  --line: rgba(255, 255, 255, 0.26);
  --line-soft: rgba(255, 255, 255, 0.14);
  --gold: #f7d56d;
  --gold-deep: #d9b24e;
  --danger: #bc494d;
  --text: #f6f2e8;
  --muted: #c8c3b7;
  --bad: #ff676b;
  --ok: #86f5a8;
  --paper: #fbfbf8;
  --paper-ink: #141414;
  --paper-line: rgba(255, 255, 255, 0.22);
  --selected: #def8d3;
  --selected-line: #b8eba8;
  --glass: rgba(39, 45, 62, 0.78);
  --glass-2: rgba(32, 37, 52, 0.92);
  --glow: rgba(136, 226, 104, 0.34);
}

body {
  background: #181a20;
}

.plugin-shell {
  padding: 0 12px 18px;
  background:
    radial-gradient(circle at 22% 130px, rgba(117, 137, 188, 0.28), transparent 165px),
    radial-gradient(circle at 92% 340px, rgba(122, 238, 155, 0.16), transparent 180px),
    linear-gradient(155deg, #191d27 0%, #11141b 54%, #171c24 100%);
  color: var(--text);
}

.plugin-shell::-webkit-scrollbar-track {
  background: #232632;
}

.plugin-shell::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #636b7d, #3d4351);
  border: 2px solid #232632;
  border-radius: 9px;
}

.topbar {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  margin: 0 -4px 6px;
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-wordmark {
  color: #f7d56d;
  text-shadow: 0 8px 28px rgba(247, 213, 109, 0.22);
}

.brand .version {
  color: rgba(255, 255, 255, 0.92);
}

.brand p {
  color: rgba(246, 242, 232, 0.78);
}

.section {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(42, 48, 64, 0.62), rgba(19, 22, 31, 0.64));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.07);
}

.major-tab-section {
  padding: 8px 6px;
  background: linear-gradient(135deg, rgba(31, 36, 50, 0.74), rgba(20, 23, 32, 0.74));
}

.section-line strong,
.minor-title,
.param-card label,
.panel-label {
  color: rgba(255, 255, 255, 0.94);
}

.section-line span {
  color: var(--ok);
}

.state-bad {
  color: var(--bad);
}

.state-ok {
  color: var(--ok);
}

.url-row {
  border-radius: 12px;
}

.url-row .url-label,
.url-row input,
.url-row .connect-action {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.url-row .url-label {
  border-radius: 12px 0 0 12px;
  background: linear-gradient(135deg, #f6dd78, #c59a3c);
  color: #1b1510;
}

.url-row input {
  background: rgba(13, 16, 24, 0.88);
  color: #fff;
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.34);
}

.url-row .connect-action {
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.url-row .connect-action:hover,
.panel-action:hover,
.category-tab:hover,
.feature-button:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.major-tabs {
  height: 64px;
}

.major-tab {
  height: 60px;
  border-radius: 16px;
  color: rgba(231, 234, 242, 0.55);
  transition: transform 120ms ease, color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.major-tab.active {
  background: linear-gradient(180deg, rgba(221, 249, 210, 0.18), rgba(109, 234, 143, 0.07));
  color: #64f18e;
  box-shadow: inset 0 0 0 1px rgba(139, 245, 169, 0.18), 0 12px 28px rgba(71, 221, 118, 0.1);
}

.major-icon {
  font-size: 20px;
}

.major-label {
  color: inherit;
  font-weight: 800;
}

.workbench {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(157, 176, 230, 0.28), transparent 120px),
    linear-gradient(145deg, rgba(45, 51, 70, 0.84), rgba(24, 28, 40, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 18px 34px rgba(0, 0, 0, 0.22);
}

.category-tab {
  height: 42px;
  line-height: 40px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f3f4f3);
  color: #151515;
  font-size: 13px;
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.category-tab.active {
  background: linear-gradient(180deg, #e5fbda, #d1f3c4);
  color: #101610;
  box-shadow: 0 10px 24px rgba(94, 214, 106, 0.2), inset 0 0 0 1px rgba(133, 225, 120, 0.5);
}

.feature-grid {
  margin-top: 8px;
  padding: 10px;
  border: 0;
  border-radius: 18px;
  background: #fbfbf8;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.feature-button {
  height: 64px;
  padding: 8px 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7f7f4);
  color: #111;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.feature-button.wide {
  width: 100%;
  margin-right: 0;
}

.feature-button.active {
  background: linear-gradient(180deg, #e7fbde, #d8f5cd);
  color: #101610;
  border-color: rgba(117, 221, 104, 0.46);
  box-shadow: 0 12px 26px rgba(72, 201, 91, 0.22);
}

.feature-mini-icon {
  height: 18px;
  line-height: 18px;
  color: #121212;
  font-size: 16px;
}

.feature-button.active .feature-mini-icon {
  color: #26a957;
}

.feature-label {
  font-size: 12px;
  font-weight: 800;
}

.feature-grid .empty-custom {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
}

.param-card,
.progress-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(39, 45, 62, 0.82), rgba(21, 25, 35, 0.88));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.07);
}

.action-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

textarea,
input,
select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(12, 15, 23, 0.82);
  color: #fff;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(137, 239, 151, 0.72);
  box-shadow: 0 0 0 3px rgba(106, 231, 139, 0.12);
}

.prompt-card textarea,
.custom-editor textarea {
  border-radius: 12px;
  background: rgba(12, 15, 23, 0.9);
  box-shadow: inset 0 1px 18px rgba(0, 0, 0, 0.34);
}

.reference-preview {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 0, rgba(245, 214, 124, 0.12), transparent 110px),
    linear-gradient(135deg, rgba(30, 34, 45, 0.9), rgba(15, 18, 26, 0.96));
}

.reference-preview span {
  color: rgba(246, 242, 232, 0.78);
}

.reference-controls .panel-action,
.button-row .panel-action,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.panel-action {
  cursor: pointer;
}

.solid-button {
  background: linear-gradient(135deg, #f6dd78, #d9f5c8 52%, #a8e7b4);
  color: #171812;
  box-shadow: 0 10px 24px rgba(186, 224, 120, 0.18);
}

.outline-button {
  background: rgba(255, 255, 255, 0.08);
  color: #f8f4eb;
}

.danger-button {
  background: linear-gradient(135deg, #d75e5e, #a93c47);
  color: #fff;
}

.select-grid select,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.option-chip.active,
.strength-chip.active {
  background: linear-gradient(180deg, #e8fbdf, #d6f3ca);
  color: #101610;
  border-color: rgba(117, 221, 104, 0.46);
}

.identity-check-row {
  color: #dff8d5;
}

.feature-note-card span {
  color: rgba(246, 242, 232, 0.74);
}

.xhn-slider::before {
  height: 6px;
  top: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.xhn-slider-fill {
  top: 18px;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f6d96f, #91ef9d);
}

.xhn-slider-thumb {
  top: 12px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border: 3px solid #f8df74;
  border-radius: 50%;
  background: #202432;
  box-shadow: 0 0 0 5px rgba(248, 223, 116, 0.12);
}

.progress-card {
  min-height: 142px;
}

.progress-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

#progressBar {
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f6d96f, #77ec9c);
}

.log-line {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(246, 242, 232, 0.78);
}

.result-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 430px) {
  .section {
    padding: 9px;
    border-radius: 14px;
  }

  .workbench {
    padding: 10px;
  }

  .category-tab {
    height: 40px;
    line-height: 38px;
    border-radius: 12px;
    font-size: 12px;
  }

  .feature-grid {
    padding: 9px;
    border-radius: 16px;
  }

  .feature-button {
    height: 62px;
    border-radius: 10px;
    font-size: 12px;
  }

  .feature-label {
    font-size: 11px;
  }
}

/* v0.2.20 visual polish: extend the same soft-card skin to every control */
@keyframes xhn-soft-breathe {
  0% {
    box-shadow: 0 10px 24px rgba(92, 222, 111, 0.14), inset 0 0 0 1px rgba(133, 225, 120, 0.44);
  }
  50% {
    box-shadow: 0 14px 30px rgba(92, 222, 111, 0.24), inset 0 0 0 1px rgba(176, 246, 160, 0.62);
  }
  100% {
    box-shadow: 0 10px 24px rgba(92, 222, 111, 0.14), inset 0 0 0 1px rgba(133, 225, 120, 0.44);
  }
}

.plugin-shell {
  min-height: 100%;
}

.section {
  border-color: rgba(255, 255, 255, 0.22);
}

.workbench {
  padding: 14px;
}

.category-tabs {
  padding: 0 2px;
}

.category-tab,
.feature-button,
.panel-action,
.option-chip,
.strength-chip {
  cursor: pointer;
}

.category-tab.active,
.feature-button.active,
.option-chip.active,
.strength-chip.active {
  animation: xhn-soft-breathe 2.8s ease-in-out infinite;
}

.feature-grid {
  padding: 12px;
}

.light-directory-grid .light-feature-card,
.feature-button {
  border-radius: 12px;
}

.param-panel {
  padding-top: 2px;
}

.param-card,
.progress-card,
.result-item,
.custom-action-section {
  border-color: rgba(255, 255, 255, 0.2);
}

.field-stack,
.prompt-card,
.custom-editor,
.compact-controls,
.identity-lock-card,
.feature-note-card {
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.08), transparent 92px),
    linear-gradient(145deg, rgba(43, 50, 69, 0.86), rgba(18, 22, 32, 0.92));
}

.compact-controls .slider-row + .slider-row {
  margin-top: 8px;
}

.param-grid input,
.slider-value,
.select-grid select,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip,
.reference-controls .panel-action,
.button-row .panel-action {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.select-grid select,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip {
  border-radius: 12px;
}

.reference-controls .panel-action,
.button-row .panel-action {
  border-radius: 12px;
}

.reference-controls .panel-action + .panel-action {
  margin-left: 8px;
}

.check-item {
  color: rgba(246, 242, 232, 0.9);
}

.identity-lock-card {
  padding: 12px;
}

.identity-check-row {
  color: #dcffd6;
}

.solid-button,
.button-row .solid-button {
  background: linear-gradient(135deg, #f5dd79 0%, #def8d3 54%, #9bebaa 100%);
  color: #111811;
}

.outline-button,
.button-row .outline-button {
  background: rgba(255, 255, 255, 0.09);
  color: #f8f4eb;
}

.danger-button,
.button-row .danger-button {
  background: linear-gradient(135deg, #d86161, #ad3f4d);
  color: #fff;
}

.panel-action.is-disabled {
  cursor: default;
  opacity: 0.44;
  transform: none;
}

.reference-preview img {
  border-radius: 10px;
}

.result-item {
  background:
    radial-gradient(circle at 0 0, rgba(132, 236, 158, 0.1), transparent 82px),
    rgba(255, 255, 255, 0.07);
}

.result-item img {
  border-radius: 10px;
}

.result-item strong {
  color: #fff;
}

.result-item small {
  color: rgba(246, 242, 232, 0.68);
}

.feature-note-card strong {
  color: #fff;
}

.exclusive-empty {
  min-height: 86px;
  padding-top: 24px;
}

/* v0.2.21 full glass skin: unified translucent UI, no logic changes */
:root {
  --bg: #171a23;
  --panel: rgba(33, 38, 53, 0.72);
  --panel-soft: rgba(46, 53, 72, 0.68);
  --line: rgba(255, 255, 255, 0.25);
  --line-soft: rgba(255, 255, 255, 0.13);
  --gold: #f4d87a;
  --gold-deep: #d2a94c;
  --danger: #bd4d58;
  --text: #f7f2e8;
  --muted: rgba(247, 242, 232, 0.68);
  --bad: #ff6b70;
  --ok: #70f59a;
  --paper: rgba(255, 255, 255, 0.1);
  --paper-ink: #f8f3e9;
  --paper-line: rgba(255, 255, 255, 0.22);
  --selected: rgba(224, 255, 214, 0.92);
  --selected-line: rgba(151, 241, 130, 0.78);
  --glass: rgba(35, 42, 60, 0.72);
  --glass-2: rgba(20, 24, 35, 0.86);
  --glow: rgba(128, 236, 125, 0.26);
  --warm-glow: rgba(255, 191, 103, 0.18);
  --cool-glow: rgba(137, 157, 235, 0.2);
}

body {
  background: #1d2029;
}

.plugin-shell {
  padding: 0 12px 18px;
  background:
    radial-gradient(circle at 18% 116px, rgba(114, 134, 202, 0.28), transparent 148px),
    radial-gradient(circle at 92% 292px, rgba(129, 239, 152, 0.18), transparent 170px),
    radial-gradient(circle at 18% 650px, rgba(255, 178, 108, 0.12), transparent 190px),
    linear-gradient(145deg, #202431 0%, #161a24 46%, #11151d 100%);
}

.topbar {
  height: 34px;
  line-height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-title {
  color: rgba(255, 255, 255, 0.82);
}

.brand {
  margin: 0 -2px 10px;
  padding: 22px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 0, rgba(244, 216, 122, 0.11), transparent 110px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.brand-wordmark {
  color: #f4d87a;
  text-shadow: 0 10px 32px rgba(244, 216, 122, 0.28);
}

.brand p {
  color: rgba(247, 242, 232, 0.72);
}

.brand .version {
  color: rgba(255, 255, 255, 0.94);
}

.section {
  margin: 0 0 12px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.09), transparent 110px),
    linear-gradient(145deg, rgba(47, 54, 74, 0.58), rgba(18, 22, 32, 0.7));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.08);
}

.major-tab-section,
.section:nth-of-type(2) {
  padding: 8px;
}

.section-line strong,
.minor-title,
.param-card label,
.panel-label {
  color: rgba(255, 255, 255, 0.94);
}

.section-line span,
.state-ok {
  color: #72f29a;
}

.state-bad {
  color: #ff6970;
}

.url-row {
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.url-row .url-label,
.url-row input,
.url-row .connect-action {
  height: 42px;
  line-height: 40px;
  border: 0;
}

.url-row .url-label {
  border-radius: 14px 0 0 14px;
  background: linear-gradient(135deg, rgba(247, 221, 128, 0.96), rgba(198, 151, 59, 0.9));
  color: #20170d;
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.22);
}

.url-row input {
  background: rgba(12, 15, 23, 0.72);
  color: #fff;
}

.url-row .connect-action {
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.major-tabs {
  height: 66px;
  border-bottom: 0;
}

.major-tab {
  height: 60px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(231, 236, 245, 0.52);
}

.major-tab.active {
  background:
    radial-gradient(circle at 50% 8px, rgba(114, 245, 154, 0.22), transparent 38px),
    rgba(102, 244, 145, 0.08);
  color: #63f28f;
  box-shadow: inset 0 0 0 1px rgba(138, 248, 164, 0.18), 0 12px 24px rgba(70, 221, 118, 0.12);
}

.major-icon {
  color: inherit;
  text-shadow: 0 8px 20px rgba(118, 245, 150, 0.24);
}

.workbench {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 8%, rgba(152, 169, 230, 0.22), transparent 124px),
    radial-gradient(circle at 92% 18%, rgba(115, 243, 145, 0.12), transparent 120px),
    linear-gradient(145deg, rgba(52, 59, 79, 0.76), rgba(23, 28, 40, 0.84));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 18px 36px rgba(0, 0, 0, 0.24);
}

.category-tabs {
  padding: 0;
}

.category-tab {
  height: 43px;
  line-height: 41px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.16), transparent 44px),
    rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.category-tab:nth-child(2n) {
  background:
    radial-gradient(circle at 18% 0, rgba(151, 170, 239, 0.18), transparent 45px),
    rgba(255, 255, 255, 0.075);
}

.category-tab.active {
  border-color: rgba(154, 244, 135, 0.82);
  background:
    radial-gradient(circle at 22% 0, rgba(255, 255, 255, 0.42), transparent 48px),
    linear-gradient(135deg, rgba(228, 255, 216, 0.98), rgba(202, 246, 190, 0.92));
  color: #101910;
  box-shadow: 0 13px 26px rgba(91, 224, 111, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.feature-grid {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.12), transparent 88px),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 15px 30px rgba(0, 0, 0, 0.18);
}

.feature-button {
  height: 66px;
  padding: 9px 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 22% 0, rgba(255, 255, 255, 0.2), transparent 52px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 20px rgba(0, 0, 0, 0.16);
}

.feature-button:nth-child(3n + 1) {
  background:
    radial-gradient(circle at 18% 0, rgba(122, 152, 255, 0.22), transparent 58px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
}

.feature-button:nth-child(3n + 2) {
  background:
    radial-gradient(circle at 18% 0, rgba(255, 171, 125, 0.2), transparent 58px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
}

.feature-button:nth-child(3n) {
  background:
    radial-gradient(circle at 18% 0, rgba(127, 235, 174, 0.2), transparent 58px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
}

.feature-button.active {
  border-color: rgba(149, 240, 128, 0.86);
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.42), transparent 55px),
    linear-gradient(135deg, rgba(230, 255, 219, 0.98), rgba(202, 246, 190, 0.92));
  color: #111910;
}

.feature-mini-icon {
  color: inherit;
  opacity: 0.9;
}

.feature-button.active .feature-mini-icon {
  color: #20a84f;
  opacity: 1;
}

.feature-grid .empty-custom {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 50% 0, rgba(115, 243, 145, 0.14), transparent 80px),
    rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.param-card,
.progress-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 19px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.1), transparent 110px),
    linear-gradient(145deg, rgba(47, 54, 74, 0.68), rgba(17, 22, 32, 0.78));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 15px 30px rgba(0, 0, 0, 0.18);
}

.action-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reference-preview {
  height: 124px;
  line-height: 122px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 25% 10%, rgba(244, 216, 122, 0.13), transparent 90px),
    radial-gradient(circle at 90% 100%, rgba(118, 235, 145, 0.1), transparent 95px),
    rgba(12, 16, 24, 0.64);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.reference-preview img {
  height: 124px;
  border-radius: 13px;
}

.reference-preview span {
  color: rgba(247, 242, 232, 0.78);
}

textarea,
input,
select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: rgba(10, 14, 22, 0.66);
  color: #fff;
}

.prompt-card textarea,
.custom-editor textarea {
  background:
    radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.07), transparent 80px),
    rgba(10, 14, 22, 0.7);
  border-radius: 15px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(140, 246, 156, 0.82);
  box-shadow: 0 0 0 3px rgba(112, 245, 154, 0.13);
}

.select-grid select,
.select-grid .panel-action,
.chips .option-chip,
.chips .strength-chip,
.reference-controls .panel-action,
.button-row .panel-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.12), transparent 42px),
    rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 9px 18px rgba(0, 0, 0, 0.13);
}

.option-chip.active,
.strength-chip.active {
  border-color: rgba(150, 244, 130, 0.86);
  background: linear-gradient(135deg, rgba(230, 255, 219, 0.98), rgba(202, 246, 190, 0.92));
  color: #101910;
}

.solid-button,
.button-row .solid-button {
  border-color: rgba(150, 244, 130, 0.72);
  background: linear-gradient(135deg, rgba(246, 223, 127, 0.98), rgba(222, 248, 211, 0.98) 52%, rgba(151, 238, 170, 0.94));
  color: #121711;
}

.outline-button,
.button-row .outline-button {
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.12), transparent 44px),
    rgba(255, 255, 255, 0.08);
  color: #f8f4eb;
}

.danger-button,
.button-row .danger-button {
  border-color: rgba(255, 122, 129, 0.38);
  background: linear-gradient(135deg, rgba(217, 97, 97, 0.98), rgba(168, 58, 76, 0.96));
  color: #fff;
}

.panel-action:hover,
.category-tab:hover,
.feature-button:hover,
.option-chip:hover,
.strength-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.slider-row label {
  color: rgba(255, 255, 255, 0.9);
}

.slider-value {
  background: rgba(10, 14, 22, 0.72);
}

.xhn-slider::before {
  height: 7px;
  top: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.xhn-slider-fill {
  top: 18px;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f6d977, #7ff2a0);
}

.xhn-slider-thumb {
  top: 11px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border: 3px solid #f7dd78;
  border-radius: 50%;
  background: #222838;
  box-shadow: 0 0 0 6px rgba(247, 221, 120, 0.12), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.identity-lock-card {
  background:
    radial-gradient(circle at 0 0, rgba(114, 245, 154, 0.16), transparent 90px),
    linear-gradient(145deg, rgba(42, 59, 55, 0.7), rgba(17, 22, 32, 0.78));
}

.identity-check-row {
  color: #dfffd8;
}

.progress-card {
  min-height: 146px;
}

.progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

#progressBar {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f6d977, #70f59a);
}

.log-line {
  color: rgba(247, 242, 232, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.log-line.error {
  color: #ff747a;
}

.result-item {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(114, 245, 154, 0.12), transparent 80px),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 12px 22px rgba(0, 0, 0, 0.16);
}

.result-item img {
  border-radius: 12px;
}

.result-item strong {
  color: #fff;
}

.result-item small {
  color: rgba(247, 242, 232, 0.66);
}

.feature-note-card span,
.hint,
.compact-hint {
  color: rgba(247, 242, 232, 0.68);
}

.check-item {
  color: rgba(247, 242, 232, 0.84);
}

.plugin-shell::-webkit-scrollbar-track {
  background: rgba(20, 24, 34, 0.9);
}

.plugin-shell::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(154, 166, 196, 0.92), rgba(75, 84, 104, 0.92));
  border: 2px solid rgba(20, 24, 34, 0.9);
}

@media (max-width: 430px) {
  .section {
    border-radius: 18px;
  }

  .workbench {
    border-radius: 20px;
  }

  .category-tab {
    height: 40px;
    line-height: 38px;
    border-radius: 13px;
  }

  .feature-button {
    height: 64px;
    border-radius: 12px;
  }

  .param-card,
  .progress-card {
    border-radius: 17px;
  }
}

/* v0.2.22 control polish: remove native white/gray fields in Photoshop UXP */
.plugin-shell input,
.plugin-shell select,
.plugin-shell textarea,
.plugin-shell .slider-value,
.plugin-shell .param-grid input,
.plugin-shell .select-grid select {
  color-scheme: dark;
  background-color: rgba(10, 14, 22, 0.82) !important;
  background-image:
    radial-gradient(circle at 16% 0, rgba(255, 255, 255, 0.08), transparent 48px),
    linear-gradient(145deg, rgba(27, 33, 48, 0.96), rgba(9, 13, 21, 0.96)) !important;
  color: #f9f4ea !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.plugin-shell input::selection,
.plugin-shell textarea::selection {
  background: rgba(128, 236, 125, 0.38);
  color: #fff;
}

.plugin-shell input:focus,
.plugin-shell select:focus,
.plugin-shell textarea:focus,
.plugin-shell .slider-value:focus,
.plugin-shell .param-grid input:focus,
.plugin-shell .select-grid select:focus {
  background-color: rgba(12, 18, 29, 0.94) !important;
  border-color: rgba(139, 246, 154, 0.86) !important;
  box-shadow:
    0 0 0 3px rgba(112, 245, 154, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.plugin-shell .param-grid input,
.plugin-shell .slider-value {
  height: 32px;
  line-height: 30px;
  border-radius: 12px;
  text-align: center;
}

.plugin-shell .select-grid select {
  height: 36px;
  line-height: 34px;
  border-radius: 13px;
  padding-left: 10px;
  padding-right: 10px;
}

.plugin-shell .select-grid select option {
  background-color: #151a25;
  color: #f9f4ea;
}

/* v0.2.23 final field unification: no white, no old gray, no pure black islands */
.plugin-shell .url-row {
  padding: 0;
  background:
    radial-gradient(circle at 16% 0, rgba(255, 255, 255, 0.09), transparent 58px),
    linear-gradient(135deg, rgba(42, 49, 68, 0.72), rgba(18, 23, 35, 0.88)) !important;
}

.plugin-shell .url-row input {
  margin: 0 8px !important;
  border-radius: 12px !important;
}

.plugin-shell .url-row .connect-action {
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.11), transparent 42px),
    rgba(255, 255, 255, 0.08) !important;
}

.plugin-shell input,
.plugin-shell textarea,
.plugin-shell select {
  -webkit-appearance: none;
  appearance: none;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.08), transparent 54px),
    linear-gradient(145deg, rgba(28, 34, 49, 0.98), rgba(9, 14, 23, 0.98)) !important;
  background-color: #101622 !important;
  color: #fff8ec !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -18px 38px rgba(0, 0, 0, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.16) !important;
}

.plugin-shell textarea,
.plugin-shell .prompt-card textarea,
.plugin-shell .custom-editor textarea {
  background:
    radial-gradient(circle at 18% 0, rgba(119, 142, 224, 0.15), transparent 96px),
    radial-gradient(circle at 100% 100%, rgba(118, 235, 145, 0.1), transparent 120px),
    linear-gradient(145deg, rgba(20, 26, 39, 0.98), rgba(8, 13, 22, 0.98)) !important;
  background-color: #111826 !important;
  color: #fff8ec !important;
}

.plugin-shell .param-grid input,
.plugin-shell .slider-value {
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.08), transparent 42px),
    linear-gradient(145deg, rgba(31, 38, 54, 0.98), rgba(10, 15, 24, 0.98)) !important;
  background-color: #111827 !important;
  color: #fff8ec !important;
}

.plugin-shell .select-grid select {
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.09), transparent 46px),
    linear-gradient(145deg, rgba(42, 49, 65, 0.98), rgba(18, 23, 35, 0.98)) !important;
  background-color: #1a2030 !important;
  color: #f8f2e7 !important;
}

.plugin-shell .select-grid select:hover,
.plugin-shell input:hover,
.plugin-shell textarea:hover {
  border-color: rgba(255, 255, 255, 0.32) !important;
}

.plugin-shell .param-card {
  background:
    radial-gradient(circle at 0 0, rgba(122, 142, 216, 0.12), transparent 120px),
    radial-gradient(circle at 100% 100%, rgba(113, 235, 148, 0.08), transparent 130px),
    linear-gradient(145deg, rgba(38, 45, 63, 0.7), rgba(16, 21, 33, 0.82)) !important;
}

.plugin-shell .prompt-card,
.plugin-shell .compact-controls,
.plugin-shell .field-stack {
  background:
    radial-gradient(circle at 0 0, rgba(127, 148, 224, 0.14), transparent 126px),
    radial-gradient(circle at 100% 100%, rgba(118, 235, 145, 0.1), transparent 136px),
    linear-gradient(145deg, rgba(42, 49, 68, 0.72), rgba(17, 22, 34, 0.84)) !important;
}

/* v0.2.24 compact feature layout: no full-row feature buttons */
.plugin-shell .feature-button.wide {
  width: 31.5% !important;
  margin-right: 2.75% !important;
}

.plugin-shell .feature-button.wide:nth-child(3n) {
  margin-right: 0 !important;
}

/* XNH 2026 UI refresh */
:root {
  --xnh-bg: #edf1f3;
  --xnh-surface: rgba(249, 251, 252, 0.86);
  --xnh-ink: #16191e;
  --xnh-muted: #6e7682;
  --xnh-line: rgba(121, 132, 144, 0.22);
  --xnh-shadow: 16px 22px 42px rgba(58, 68, 78, 0.24), -10px -10px 24px rgba(255, 255, 255, 0.82);
  --xnh-inset: inset 7px 7px 16px rgba(108, 122, 136, 0.16), inset -7px -7px 16px rgba(255, 255, 255, 0.88);
  --xnh-gold: #d8af67;
  --xnh-orange: #ff8617;
}

html,
body {
  background: var(--xnh-bg) !important;
  color: var(--xnh-ink) !important;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

.hidden {
  display: none !important;
}

.plugin-shell {
  padding: 14px 14px 22px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(215, 222, 228, 0.72)), var(--xnh-bg) !important;
  color: var(--xnh-ink) !important;
  overflow-y: auto !important;
}

.plugin-shell::-webkit-scrollbar {
  width: 8px !important;
}

.plugin-shell::-webkit-scrollbar-track {
  background: rgba(155, 164, 174, 0.16) !important;
}

.plugin-shell::-webkit-scrollbar-thumb {
  background: rgba(96, 104, 116, 0.38) !important;
  border-radius: 8px !important;
}

.xnh-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 48px;
}

.xnh-title {
  color: #0f1115;
  font-size: 24px;
  font-weight: 800;
  line-height: 32px;
  text-align: center;
}

.xnh-version {
  position: absolute;
  right: 4px;
  top: 13px;
  color: rgba(20, 24, 30, 0.5);
  font-size: 11px;
  font-weight: 700;
}

.xnh-connect-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 72px minmax(116px, 180px);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(248, 251, 253, 0.72);
  box-shadow: var(--xnh-shadow);
}

.url-row {
  display: grid !important;
  grid-template-columns: 96px minmax(80px, 1fr) 76px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.url-row .url-label,
.url-row input,
.url-row .connect-action {
  height: 42px !important;
  border: 0 !important;
  line-height: 42px !important;
}

.url-row .url-label {
  border-radius: 8px 0 0 8px !important;
  background: linear-gradient(180deg, #edcc7a, #d8ad59) !important;
  color: #1c1710 !important;
  font-weight: 800 !important;
  text-align: center;
}

.url-row input {
  min-width: 0;
  margin: 0 !important;
  padding: 0 12px !important;
  background: #eaf0f3 !important;
  color: #1c2128 !important;
  box-shadow: var(--xnh-inset);
  outline: 0;
}

.url-row .connect-action {
  border-radius: 0 8px 8px 0 !important;
  background: #1d2330 !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.url-row .connect-action:hover,
.panel-action:hover,
.home-card:hover,
.feature-button:hover,
.major-tab:hover {
  transform: translateY(-1px);
}

.url-row .connect-action:active,
.panel-action:active,
.home-card:active,
.feature-button:active,
.major-tab:active {
  transform: translateY(1px) scale(0.99);
}

.connection-pill {
  min-width: 64px;
  text-align: center;
  font-weight: 800;
}

.state-bad {
  color: #8a4a20 !important;
}

.state-ok {
  color: #262a31 !important;
}

.user-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: #11151b;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 4px 4px 12px rgba(130, 142, 153, 0.1), inset -4px -4px 12px rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.user-code-box strong {
  max-width: 88px;
  overflow: hidden;
  color: #1c2430;
  text-overflow: ellipsis;
}

.xnh-workspace {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.xnh-sidebar,
.xnh-main {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(249, 251, 252, 0.78);
  box-shadow: var(--xnh-shadow);
}

.xnh-sidebar {
  min-height: 580px;
  padding: 22px 10px;
}

.major-tabs {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px;
  width: 100%;
  height: auto !important;
}

.major-tab {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
  width: 84px !important;
  height: 72px !important;
  margin: 0 auto !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(232, 237, 241, 0.82)) !important;
  box-shadow: 7px 9px 18px rgba(89, 101, 114, 0.24), -7px -7px 16px rgba(255, 255, 255, 0.92);
  color: #1d232b !important;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.major-tab.active {
  background: linear-gradient(145deg, #686f7b, #4f5661) !important;
  color: #fff !important;
  box-shadow: 7px 10px 18px rgba(73, 82, 94, 0.38), inset 3px 3px 8px rgba(255, 255, 255, 0.08);
}

.major-icon {
  height: 28px !important;
  line-height: 28px !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

.major-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 16px;
}

.xnh-main {
  min-height: 580px;
  padding: 26px;
}

.xnh-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--xnh-line);
}

.workbench-title {
  color: #111419;
  font-size: 24px;
  font-weight: 800;
  line-height: 30px;
}

.workbench-hint {
  margin-top: 4px;
  color: var(--xnh-muted);
  font-size: 12px;
}

.head-tools {
  display: flex;
  gap: 12px;
}

.head-tool {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #3b424e;
  font-size: 22px;
  font-weight: 900;
  line-height: 42px;
  text-align: center;
  box-shadow: 6px 8px 16px rgba(91, 104, 118, 0.18), -5px -5px 14px rgba(255, 255, 255, 0.9);
}

.category-tabs {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-tab {
  height: 34px;
  min-width: 86px;
  padding: 0 12px;
  border: 1px solid var(--xnh-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #242a33;
  font-weight: 800;
}

.category-tab.active {
  border-color: rgba(216, 175, 103, 0.65);
  background: #fff4df;
  color: #151515;
}

.home-grid,
.feature-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.home-card {
  min-height: 230px;
  overflow: hidden;
  border-radius: 8px;
  background: #f8fafb;
  box-shadow: 12px 16px 30px rgba(67, 78, 91, 0.22), -8px -8px 18px rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-cover {
  position: relative;
  height: 158px;
  background-size: cover;
  background-position: center 36%;
}

.home-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(20, 24, 30, 0.35));
}

.home-cover span {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  padding: 14px 16px;
}

.home-card-body strong {
  color: #171b21;
  font-size: 16px;
  font-weight: 900;
}

.home-card-body small {
  color: #5f6873;
  font-size: 12px;
  line-height: 16px;
}

.feature-button {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  color: #202631 !important;
  box-shadow: 7px 8px 16px rgba(93, 106, 119, 0.18), -6px -6px 14px rgba(255, 255, 255, 0.86) !important;
  cursor: pointer;
}

.feature-button.active {
  background: #565d69 !important;
  color: #fff !important;
}

.feature-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(216, 175, 103, 0.2);
  color: inherit;
  font-weight: 900;
}

.feature-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.parameter-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(216, 175, 103, 0.36);
  border-radius: 8px;
  background: rgba(235, 239, 242, 0.68);
}

.param-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.minor-title {
  color: #11151b !important;
  font-size: 16px;
  font-weight: 900;
}

.workflow-badge {
  max-width: 180px;
  overflow: hidden;
  color: #8a5b1b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.param-card,
.progress-card {
  border: 1px solid rgba(127, 138, 149, 0.16) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #1b2028 !important;
  box-shadow: none !important;
}

.param-card {
  margin: 0 0 12px !important;
  padding: 12px !important;
}

.param-card label,
.settings-group-title {
  color: #11151b !important;
  font-weight: 900 !important;
}

.reference-preview {
  min-height: 190px;
  border: 1px solid rgba(216, 175, 103, 0.42) !important;
  border-radius: 8px !important;
  background: rgba(208, 214, 219, 0.52) !important;
  box-shadow: var(--xnh-inset);
}

textarea,
input,
select {
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(210, 216, 221, 0.76) !important;
  color: #222832 !important;
  outline: 0 !important;
}

textarea {
  min-height: 72px;
}

.panel-action {
  min-height: 38px;
  border: 1px solid rgba(129, 140, 151, 0.2) !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  transition: transform 160ms ease, background 160ms ease;
}

.solid-button {
  background: linear-gradient(180deg, #ff9b24, #ff8415) !important;
  color: #fff !important;
}

.outline-button {
  background: rgba(255, 255, 255, 0.64) !important;
  color: #232832 !important;
}

.danger-button {
  background: #59616d !important;
  color: #fff !important;
}

.identity-lock-card {
  background: transparent !important;
  border-color: transparent !important;
  padding: 4px 0 !important;
}

.progress-card {
  margin-top: 16px;
  padding: 14px;
}

.progress-head {
  color: #232832 !important;
}

.progress-track {
  height: 8px;
  border-radius: 8px;
  background: rgba(172, 182, 192, 0.38) !important;
}

#progressBar {
  border-radius: 8px;
  background: linear-gradient(90deg, #d8af67, #ff8d19) !important;
}

.log-line,
.result-list {
  color: #646d78 !important;
}

.result-section {
  margin-top: 14px;
}

.pending-card,
.home-intro-card {
  min-height: 120px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #202631;
}

.pending-card strong,
.home-intro-card strong {
  display: block;
  color: #11151b;
  font-size: 20px;
  font-weight: 900;
}

.pending-card span {
  display: inline-block;
  margin-top: 14px;
  color: #a66b21;
  font-size: 18px;
  font-weight: 900;
}

.pending-card p,
.home-intro-card span {
  display: block;
  margin-top: 10px;
  color: #68717d;
  line-height: 22px;
}

.settings-parameter {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.settings-panel {
  padding: 22px;
  border-radius: 8px;
  background: #2d2d32;
  color: #ebedf0;
}

.settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.settings-title-row strong {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.settings-title-row span {
  color: #a7abb2;
  font-size: 24px;
}

.settings-group-title {
  margin: 18px 0 10px;
  color: #cfd3da !important;
}

.setting-row,
.about-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 10px;
  padding: 10px 14px;
  color: #f2f4f6;
  font-weight: 800;
}

.setting-row select {
  width: 142px;
  height: 36px;
  background: #4a4a50 !important;
  color: #fff !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  display: none;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #6a6d73;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch i::after {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + i {
  background: #168be8;
}

.switch input:checked + i::after {
  transform: translateX(18px);
}

.compact-button {
  min-width: 86px;
  min-height: 34px;
  padding: 0 14px;
  line-height: 34px;
  text-align: center;
}

.about-box {
  padding: 12px 16px;
}

.about-box div {
  display: flex;
  justify-content: space-between;
  min-height: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  line-height: 30px;
}

.about-box div:last-child {
  border-bottom: 0;
}

.about-box span {
  color: #aeb3bb;
}

.about-box strong {
  color: #f5f6f8;
}

.contact-box {
  margin-top: 18px;
  padding: 20px;
  border-radius: 8px;
  background: #f4f7fa;
  color: #11151b;
  text-align: center;
}

.contact-box span,
.contact-box strong {
  display: block;
}

.contact-box strong {
  margin-top: 16px;
  font-size: 22px;
}

@media (max-width: 560px) {
  .plugin-shell {
    padding: 10px !important;
  }

  .xnh-title {
    font-size: 20px;
  }

  .xnh-connect-card {
    grid-template-columns: 1fr;
  }

  .xnh-workspace {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .xnh-sidebar {
    padding: 14px 6px;
  }

  .major-tab {
    width: 68px !important;
    height: 64px !important;
  }

  .major-label {
    font-size: 12px;
  }

  .xnh-main {
    padding: 16px;
  }

  .home-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.plugin-shell .param-card,
.plugin-shell .prompt-card,
.plugin-shell .compact-controls,
.plugin-shell .field-stack {
  background: rgba(255, 255, 255, 0.72) !important;
  color: #1b2028 !important;
}

.plugin-shell input,
.plugin-shell textarea,
.plugin-shell select,
.plugin-shell .select-grid select {
  background: rgba(210, 216, 221, 0.76) !important;
  color: #222832 !important;
  border-color: transparent !important;
}

.plugin-shell .settings-panel,
.plugin-shell .settings-panel .setting-row,
.plugin-shell .settings-panel .about-box {
  color: #ebedf0 !important;
}

.plugin-shell .settings-panel .setting-row,
.plugin-shell .settings-panel .about-box {
  background: rgba(255, 255, 255, 0.04) !important;
}

.plugin-shell .settings-panel select {
  background: #4a4a50 !important;
  color: #fff !important;
}

/* XNH polished UI overrides */
.plugin-shell {
  letter-spacing: 0 !important;
}

.xnh-connect-card {
  grid-template-columns: minmax(300px, 1fr) 78px minmax(150px, 220px) !important;
  gap: 14px !important;
  min-height: 74px !important;
  padding: 14px 18px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(234,239,242,0.76)) !important;
  border: 1px solid rgba(255,255,255,0.86) !important;
  box-shadow: 12px 14px 30px rgba(89, 104, 118, 0.16), -8px -8px 22px rgba(255,255,255,0.82) !important;
}

.url-row {
  grid-template-columns: 94px minmax(80px, 1fr) 78px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #1d2330 !important;
  box-shadow: inset 4px 4px 10px rgba(16,22,30,0.22), inset -3px -3px 10px rgba(255,255,255,0.18) !important;
}

.url-row .url-label {
  border-radius: 14px 0 0 14px !important;
  background: linear-gradient(180deg, #f0cf83, #d4a94e) !important;
  color: #19150e !important;
}

.url-row input {
  background: linear-gradient(180deg, #eef3f6, #d8e0e5) !important;
  color: #202732 !important;
  font-weight: 700 !important;
}

.url-row .connect-action {
  border-radius: 0 14px 14px 0 !important;
  background: linear-gradient(180deg, #252c38, #171d28) !important;
}

.connection-pill {
  height: 42px !important;
  line-height: 42px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.46) !important;
}

.user-code-box {
  border-radius: 16px !important;
  background: rgba(255,255,255,0.72) !important;
  font-size: 17px !important;
}

.head-tools {
  align-items: center !important;
  gap: 10px !important;
}

.head-tool {
  flex: 0 0 auto !important;
  cursor: pointer !important;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease !important;
}

.head-tool:hover,
.search-tool:hover {
  background: #f9fafb !important;
  color: #121821 !important;
}

.search-wrap {
  display: grid !important;
  grid-template-columns: 0 0;
  align-items: center;
  width: 0;
  height: 44px;
  overflow: hidden;
  opacity: 0;
  transition: width 180ms ease, opacity 180ms ease;
}

.search-wrap.open {
  grid-template-columns: minmax(120px, 180px) 28px;
  width: 210px;
  opacity: 1;
}

.search-wrap input {
  height: 38px !important;
  margin: 0 !important;
  border-radius: 12px 0 0 12px !important;
  background: rgba(255,255,255,0.92) !important;
  color: #1c2430 !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 3px 8px rgba(120,132,145,0.18) !important;
}

.search-clear {
  display: none;
  height: 38px;
  line-height: 36px;
  text-align: center;
  border-radius: 0 12px 12px 0;
  background: #252c38;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.search-clear.visible {
  display: block;
}

.home-card,
.feature-card {
  border-radius: 8px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.78) !important;
  box-shadow: 10px 14px 24px rgba(75,88,102,0.18), -6px -6px 18px rgba(255,255,255,0.82) !important;
}

.home-card:hover {
  transform: translateY(-2px) !important;
}

.home-cover {
  position: relative !important;
  min-height: 132px !important;
  background-size: cover !important;
  background-position: center !important;
}

.home-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(14,18,24,0.28));
}

.plugin-shell:not(.cover-motion-off) .home-cover::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 34%;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
  animation: xnh-cover-sheen 4.4s ease-in-out infinite;
}

@keyframes xnh-cover-sheen {
  0%, 55% { left: -55%; }
  100% { left: 120%; }
}

.home-cover span {
  z-index: 2 !important;
  border-radius: 8px !important;
  background: rgba(22,27,35,0.62) !important;
  backdrop-filter: blur(6px);
}

.home-card-body strong {
  color: #151b24 !important;
}

.home-card-body small {
  color: #66717f !important;
}

.search-empty {
  grid-column: 1 / -1;
  min-height: 92px;
  line-height: 92px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.66);
  color: #687382;
  font-size: 14px;
}

.setting-card .home-cover {
  min-height: 120px !important;
}

.panel-action,
.solid-button,
.outline-button {
  border-radius: 8px !important;
}

@media (max-width: 560px) {
  .search-wrap.open {
    width: 160px;
    grid-template-columns: minmax(90px, 132px) 28px;
  }
}

/* Photoshop UXP final layout fixes */
.xnh-titlebar {
  min-height: 42px !important;
  margin: 0 0 6px !important;
}

.xnh-title {
  font-size: 22px !important;
  line-height: 28px !important;
  letter-spacing: 0 !important;
}

.xnh-version {
  top: 9px !important;
  right: 6px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

.xnh-connect-card {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-template-columns: minmax(300px, 1fr) 76px minmax(190px, 238px) !important;
  gap: 10px !important;
  min-height: 58px !important;
  margin: 0 0 16px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

.xnh-workspace {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.xnh-sidebar,
.xnh-main {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.major-tabs,
.feature-grid,
.home-grid {
  visibility: visible !important;
  opacity: 1 !important;
}

.xnh-boot-error {
  max-width: 520px;
  margin: 72px auto 0;
  padding: 18px;
  border: 1px solid rgba(225, 36, 36, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #202630;
  box-shadow: 10px 16px 28px rgba(70, 80, 94, 0.16);
}

.xnh-boot-error strong,
.xnh-boot-error span,
.xnh-boot-error small {
  display: block;
}

.xnh-boot-error strong {
  color: #d61d1d;
  font-size: 18px;
  font-weight: 900;
}

.xnh-boot-error span {
  margin-top: 8px;
  color: #11151b;
  font-size: 13px;
  font-weight: 800;
  line-height: 20px;
}

.xnh-boot-error small {
  margin-top: 10px;
  color: #6b7380;
  font-size: 12px;
  line-height: 18px;
}

.url-row {
  grid-template-columns: 88px minmax(100px, 1fr) 70px !important;
  border-radius: 8px !important;
}

.url-row .url-label,
.url-row input,
.url-row .connect-action,
.connection-pill,
.user-code-box {
  height: 36px !important;
  min-height: 36px !important;
  line-height: 36px !important;
}

.url-row .url-label {
  border-radius: 8px 0 0 8px !important;
  font-size: 13px !important;
}

.url-row input {
  padding: 0 10px !important;
  font-size: 13px !important;
}

.url-row .connect-action {
  border-radius: 0 8px 8px 0 !important;
  font-size: 13px !important;
}

.connection-pill {
  min-width: 0 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

.user-code-box {
  justify-content: flex-start !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  gap: 4px !important;
  font-size: 12px !important;
  line-height: 14px !important;
  white-space: normal !important;
}

.user-code-box span {
  flex: 0 0 auto !important;
  font-size: 12px !important;
  line-height: 14px !important;
}

.user-code-box strong {
  display: block !important;
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  color: #141a24 !important;
  font-size: 12px !important;
  line-height: 14px !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: break-all !important;
}

.parameter-section.hidden,
.progress-card.hidden,
.result-section.hidden,
.feature-grid.hidden {
  display: none !important;
}

.settings-parameter {
  margin-top: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.settings-parameter .param-heading {
  display: none !important;
}

.settings-panel {
  max-width: 760px !important;
  margin: 0 auto !important;
  border-radius: 8px !important;
}

.reference-preview span {
  max-width: 88% !important;
  max-height: none !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.64) !important;
  color: #e12424 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 18px !important;
  text-shadow: none !important;
  white-space: normal !important;
}

.reference-preview {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
}

.reference-preview img {
  align-self: stretch !important;
}

@media (max-width: 760px) {
  .plugin-shell {
    padding: 10px 8px 18px !important;
  }

  .xnh-title {
    padding-right: 74px !important;
    padding-left: 6px !important;
    font-size: 20px !important;
    text-align: left !important;
  }

  .xnh-connect-card {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .user-code-box,
  .connection-pill {
    justify-content: flex-start !important;
    width: 100% !important;
  }

  .xnh-workspace {
    grid-template-columns: 94px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .xnh-main {
    padding: 16px !important;
  }
}

@media (max-width: 520px) {
  .xnh-workspace {
    grid-template-columns: 1fr !important;
  }

  .xnh-sidebar {
    min-height: 0 !important;
    padding: 10px 8px !important;
  }

  .major-tabs {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .major-tab {
    width: 72px !important;
    height: 58px !important;
  }
}
