/* .wrap 宽度见 brand-theme.css 流体自适应 */

header {
  text-align: left;
  margin-bottom: 18px;
}

header.site-head {
  --site-head-h: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--site-head-h);
  text-align: left;
  margin-bottom: 18px;
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--accent);
}

header.site-head h1 {
  flex: unset;
}

header.site-head .brand h1 {
  flex: unset;
  min-width: 0;
  margin: 0;
  padding: 0;
  height: auto;
  min-height: var(--site-head-h);
  display: flex;
  align-items: center;
  text-align: left;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  line-height: 1.15;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

header.site-head .brand .sub {
  display: none;
}

@media (max-width: 520px) {
  header.site-head .brand .sub {
    display: none;
  }
}

header.site-head .head-tools-floating {
  position: relative;
  top: auto;
  right: auto;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: center;
  height: var(--site-head-h);
  gap: 6px;
  margin: 0;
  padding: 0;
}

header.site-head .head-help-wrap,
header.site-head .head-menu-wrap {
  display: flex;
  align-items: center;
  height: var(--site-head-h);
}

header.site-head .theme-toggle,
header.site-head .head-menu-btn {
  width: var(--site-head-h);
  height: var(--site-head-h);
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

header.site-head .head-help-btn {
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── 会员 / 激活码 ── */
.license-zone {
  padding: 10px 14px;
  margin-bottom: 12px;
}

.license-zone.hidden {
  display: none;
}

.license-zone.lz-collapsed {
  padding: 8px 14px;
}

.lz-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.lz-label {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.license-preview {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.license-zone.lz-collapsed .license-key-row {
  display: none;
}

.license-zone:not(.lz-collapsed) .license-key-row .license-preview {
  display: none;
}

.license-key-row {
  margin-top: 8px;
}

.device-code-display {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 0;
  background: transparent;
  border: none;
}

.license-key-row #licenseKey {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.lz-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lz-action-btn {
  font-size: 0.88rem;
  line-height: 1.35;
  padding: 4px 0;
  white-space: nowrap;
}

.license-auto-hint {
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}

.license-auto-hint.hidden {
  display: none;
}

.license-zone.lz-collapsed .lz-extra {
  display: none;
}

.license-zone.lz-collapsed.lz-pin-extra .lz-extra {
  display: block;
  margin-top: 8px;
}

.license-zone.lz-pin-extra .hint.lz-extra {
  color: var(--lock-text, #be123c);
  font-weight: 600;
}

.license-zone.lz-pin-extra .lz-extra {
  color: var(--lock-text, #be123c);
}

.license-zone .hint.lz-extra {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ── 顶栏设置菜单：设备码 / 激活码（单行） ── */
.head-tools-floating .head-menu-panel {
  min-width: min(360px, calc(100vw - 24px));
}
.head-menu-inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.head-menu-inline-label {
  flex-shrink: 0;
  width: 2.2em;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.head-menu-inline-row .device-code-display {
  flex: 1;
  min-width: 0;
  font-size: inherit;
  letter-spacing: 0.03em;
  color: var(--text);
}
.head-menu-icon-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.head-menu-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.head-tools-floating .head-menu-panel #licenseKey.head-menu-license-input {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 5px 8px;
  min-height: 0;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.35;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}
.head-menu-section-last .head-menu-hint {
  font-size: 11px;
  line-height: 1.4;
}
.head-menu-section-last {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.head-menu-section-last .head-menu-hint {
  margin-top: 8px;
  padding-left: 0;
}
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  margin-bottom: 10px;
}

select optgroup {
  font-weight: 600;
  color: var(--muted);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  width: 100%;
  margin-top: 4px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.result-head h2 {
  margin: 0;
}

.result {
  margin: 0;
  min-height: 160px;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
}

footer {
  text-align: center;
  font-size: 0.8rem;
}

.card.disabled {
  opacity: 0.65;
  pointer-events: none;
}

.lock-banner.hidden {
  display: none;
}

@media (max-width: 560px) {
  .lz-row {
    flex-wrap: wrap;
  }
  .lz-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .license-preview {
    font-size: 16px;
    min-height: 44px;
  }
  .lz-action-btn {
    min-height: 44px;
    padding: 8px 0;
  }
}
