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

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

header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4.5vw, 1.65rem);
  font-weight: 700;
  color: var(--accent);
}

.mode-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-tab.active {
  background: var(--accent);
  color: #fff;
}

.mode-tab:not(.active):hover {
  color: var(--accent);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  text-align: left;
}

.page-head h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.head { margin-bottom: 14px; }
.head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.head-main { min-width: 0; flex: 1; }
.head h1 {
  margin: 4px 0;
  font-size: clamp(1.45rem, 4.5vw, 1.65rem);
  font-weight: 700;
}
.kicker {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.panel-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }

/* ── 会员 / 激活码（license-zone） ── */
.license-zone {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-color: rgba(20, 184, 166, 0.32);
}

.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;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  height: 46px;
  min-height: 46px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.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 .hint.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 .hint.lz-extra {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.search-panel.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.quota-shop-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--lock-text, #be123c);
}
.quota-shop-hint.hidden { display: none; }
.quota-shop-hint a { color: var(--accent2); }

#licenseBar.license-highlight {
  animation: licensePulse 1.2s ease-out 2;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.55);
}

@keyframes licensePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.65); }
}

.link-btn {
  border: none;
  background: none;
  padding: 6px 10px;
  color: var(--accent2);
  font-size: 13px;
  cursor: pointer;
}

.search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.category-field { flex: 1; min-width: 140px; }
.part-field { flex: 1; min-width: 140px; }

.part-search-field { margin-bottom: 12px; }

.part-search-wrap {
  position: relative;
}

.part-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-solid, #111827);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.part-suggest.hidden { display: none; }

.part-suggest li {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}

.part-suggest li:hover,
.part-suggest li:focus {
  background: rgba(20, 184, 166, 0.12);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

#categorySelect,
#partSelect,
#partSearch {
  width: 100%;
  height: var(--input-h);
  padding: 0 12px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.field { margin-bottom: 12px; }

.btn-primary {
  width: 100%;
  height: var(--input-h);
  margin-top: 4px;
}

.hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.error-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--lock-bg);
  border: 1px solid var(--lock-border);
  color: var(--lock-text);
  font-size: 13px;
}
.error-box.hidden { display: none; }

.lock-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--lock-bg);
  border: 1px solid var(--lock-border);
  color: var(--lock-text);
  font-size: 13px;
}
.lock-banner.hidden { display: none; }

.content-area {
  position: relative;
}

.page-lock {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius, 12px);
}

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

.page-lock-card {
  width: min(100%, 320px);
  padding: 20px 18px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.page-lock-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--lock-text);
}

.page-lock-msg {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.page-lock-steps {
  margin: 0 0 16px;
  padding-left: 1.15rem;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.page-lock-steps li + li { margin-top: 4px; }

.page-lock .btn-primary {
  width: 100%;
  min-height: 44px;
}

.content-area.is-locked .search-panel,
.content-area.is-locked #errorBox,
.content-area.is-locked #resultCard {
  pointer-events: none;
  user-select: none;
}

html[data-theme="light"] .page-lock {
  background: rgba(248, 250, 252, 0.78);
}

.hidden { display: none !important; }

.alias {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.part-figure {
  margin: 0 0 16px;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--input-bg);
}

.part-figure img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #0f172a;
}

.part-figure.tongue-figure img {
  max-height: min(56vw, 520px);
}

html[data-theme="light"] .part-figure img {
  background: #f1f5f9;
}

.part-figure-cap {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

.block { margin-top: 14px; }
.block-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.block-warn .block-title { color: #f59e0b; }

.body-text {
  margin: 0;
  line-height: 1.65;
  color: var(--text);
}

.dot-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.65;
}
.dot-list li + li { margin-top: 0.45rem; }

.page-disclaimer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .search-fields { flex-direction: column; }
  .category-field, .part-field { width: 100%; }
}

html, body {
  overscroll-behavior-y: contain;
}

body.is-reading .head .sub {
  display: none;
}

body.is-reading:not(.license-panel-open) #licenseBar.lz-collapsed {
  display: none;
}

.reading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: var(--radius, 12px);
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(17, 24, 39, 0.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.reading-nav-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(20, 184, 166, 0.45);
  border-radius: 10px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent2, #2dd4bf);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.reading-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.reading-nav-btn:not(:disabled):active {
  background: rgba(20, 184, 166, 0.28);
}

.reading-bar-cat {
  display: block;
  font-size: 12px;
  color: var(--muted, #94a3b8);
  margin-bottom: 2px;
}

.reading-bar-pos {
  display: block;
  font-size: 12px;
  color: var(--accent2, #2dd4bf);
  margin-top: 2px;
}

.part-reader {
  touch-action: pan-y;
}

html[data-theme="light"] .reading-bar {
  background: rgba(255, 255, 255, 0.94);
}

.reading-bar.hidden { display: none; }

.reading-bar-main {
  min-width: 0;
  flex: 1;
}

.reading-bar-main strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.reading-bar-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  width: 100%;
  justify-content: flex-end;
  margin-top: 2px;
}

@media (min-width: 480px) {
  .reading-bar {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .reading-bar-actions {
    width: auto;
    margin-top: 0;
  }
}

.reading-bar-actions .link-btn {
  min-height: 40px;
  padding: 8px 10px;
}
