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

.input-heading-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
}

.input-heading-bar h1 {
  flex: 0 1 auto;
}

.auth-area {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 100%;
  color: #80632f;
  font-size: 12px;
}

.auth-user-status {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-link {
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #80632f;
  cursor: pointer;
  font-size: inherit;
  text-decoration: none;
}

.auth-link:hover {
  background: rgba(184, 134, 11, 0.08);
  color: #6f4f1b;
}

.auth-link:focus-visible {
  outline: 2px solid rgba(184, 134, 11, 0.56);
  outline-offset: 2px;
}

@media (max-width: 620px) {

  .input-heading-bar h1 {
    width: 100%;
  }

  .auth-area {
    align-self: center;
  }
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Keep the query controls compact on desktop. */
.input-area {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 20px 22px;
}

.input-heading {
  margin-bottom: 24px;
  text-align: center;
}

.input-area h1 {
  color: #7a6d5a;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1.25;
  text-align: center;
}

.input-card {
  padding: 6px;
  border: 1px solid rgba(203, 178, 126, 0.44);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(82, 60, 32, 0.07), 0 2px 8px rgba(82, 60, 32, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.input-row input {
  min-width: 0;
  flex: 1;
  padding: 14px 18px;
  border: 0;
  border-radius: 11px;
  outline: 0;
  background: transparent;
  color: #1d1d1f;
  font-size: 14px;
}

.input-row input::placeholder {
  color: #c7c7cc;
}

.input-divider {
  width: 1px;
  height: 28px;
  margin: 0 4px;
  flex: 0 0 auto;
  background: rgba(203, 178, 126, 0.34);
}

.input-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8a7a64;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.input-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-action:hover:not(:disabled) {
  background: rgba(199, 154, 58, 0.08);
  color: #755420;
}

.input-row .btn-analyze {
  min-height: 40px;
  padding: 0 26px;
  border: 0;
  border-radius: 10px;
  background: #fbf8f6;
  box-shadow: 0 5px 12px rgba(140, 96, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #74584f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
}

.input-row .btn-analyze:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #f7f1ee;
  box-shadow: 0 8px 16px rgba(140, 96, 80, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.input-row .btn-analyze:disabled,
.input-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-action:focus-visible,
.input-row .btn-analyze:focus-visible {
  outline: 2px solid rgba(184, 134, 11, 0.56);
  outline-offset: 2px;
}

.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 10px auto 0;
  color: #8a7a64;
  font-size: 12.5px;
  line-height: 1.5;
}

.contact-links {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.contact-prefix,
.contact-separator {
  white-space: nowrap;
}

.wechat-contact,
.join-group-button {
  display: inline-flex;
  align-items: center;
  padding: 4px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a7a64;
  cursor: pointer;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  text-align: left;
  white-space: nowrap;
}

.wechat-contact:hover,
.join-group-button:hover {
  background: rgba(199, 154, 58, 0.08);
  color: #755420;
}

.wechat-contact:focus-visible,
.join-group-button:focus-visible {
  outline: 2px solid rgba(184, 134, 11, 0.56);
  outline-offset: 2px;
}

.wechat-contact[data-state="success"] {
  color: #6f7f61;
}

.wechat-contact[data-state="error"] {
  color: #b42318;
}

.join-group-button {
  padding: 5px 6px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: #80632f;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(184, 134, 11, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: background 140ms ease, color 140ms ease;
}

.join-group-button::after {
  content: none;
}

.join-group-button:hover {
  background: rgba(184, 134, 11, 0.06);
  color: #6f4f1b;
}

.join-group-button:active {
  background: rgba(184, 134, 11, 0.1);
}


body.group-qr-open {
  overflow: hidden;
}

.group-qr-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(29, 29, 31, 0.48);
}

.group-qr-modal {
  position: relative;
  width: min(100%, 390px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(203, 178, 126, 0.44);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(29, 29, 31, 0.2);
  text-align: center;
}

.group-qr-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a7a64;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.group-qr-close:hover {
  background: rgba(199, 154, 58, 0.08);
  color: #755420;
}

.group-qr-close:focus-visible {
  outline: 2px solid rgba(184, 134, 11, 0.56);
  outline-offset: 2px;
}

.group-qr-modal h2 {
  color: #7a6d5a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
}

.group-qr-note,
.group-qr-hint {
  color: #8a7a64;
  font-size: 12px;
  line-height: 1.5;
}

.group-qr-frame {
  width: min(76vw, 300px);
  aspect-ratio: 1;
  margin: 17px auto 12px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.group-qr-image {
  display: block;
  width: 100%;
  height: 100%;
}

.group-qr-hint {
  color: #a17f50;
}

.analysis-meta {
  min-height: 24px;
  padding: 7px 6px 0;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.analysis-meta[data-kind="success"] {
  color: #6f7f61;
}

.analysis-meta[data-kind="error"] {
  color: #b42318;
}

.error-box {
  max-width: 720px;
  margin: 0 auto 18px;
  padding: 16px 20px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 14px;
}

.analysis-wait {
  max-width: 720px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 8px auto 28px;
  padding: 36px 20px;
  border: 1px solid rgba(203, 178, 126, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(82, 60, 32, 0.05);
  color: #7a6d5a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.analysis-wait-hint {
  color: #9a8d7a;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.analysis-wait-progress {
  position: relative;
  width: min(300px, 72vw);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(203, 178, 126, 0.2);
}

.analysis-wait-progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c5a05a, #a97a2f);
  animation: analysis-wait-progress 1.4s ease-in-out infinite;
}

.analysis-wait-actions {
  min-height: 34px;
}

.analysis-wait-action {
  min-height: 34px;
  padding: 6px 16px;
  border: 1px solid rgba(179, 138, 66, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #806128;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.analysis-wait-action:hover,
.analysis-wait-action:focus-visible {
  border-color: #b38a42;
  outline: none;
  background: #fffaf0;
}

@keyframes analysis-wait-progress {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(365%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-wait-progress > span {
    width: 100%;
    opacity: 0.72;
    animation: none;
  }
}

/* 与主程序一致的结果 Tab 和内容宽度 */
.report-tabs {
  max-width: 960px;
  display: flex;
  gap: 0;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
}

.report-tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid #e5e5ea;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f5f5f7;
  color: #6e6e73;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.report-tab.active {
  position: relative;
  z-index: 1;
  margin-bottom: -1px;
  border-bottom: 1px solid #fff;
  background: #fff;
  color: #1d1d1f;
}

.report-tab:hover:not(.active) {
  background: #eeeef0;
}

.report-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.report-header {
  margin-bottom: 12px;
  padding: 18px 20px 16px;
  border: 1px solid #dddfe5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(20, 20, 20, 0.02);
  text-align: center;
}

.report-title {
  color: #d12e46;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
}

.report-info {
  margin-top: 6px;
  color: #a8a29e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.report-state {
  padding: 28px 20px;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #fff;
  color: #86868b;
  font-size: 14px;
  text-align: center;
}

.overview-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee8e2;
}

.overview-section h3 {
  margin-bottom: 8px;
  color: #292524;
  font-size: 15px;
  font-weight: 850;
}

.overview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.overview-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #f1ebdf;
  border-radius: 9px;
  background: #fcfbf8;
}

.overview-item span {
  color: #78716c;
  font-size: 13px;
  font-weight: 700;
}

.overview-item strong {
  color: #44403c;
  font-size: 14px;
}

/* 式神：复用主程序的摘要、分组和卡片类名 */
.shishen-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 7px;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #fff;
}

.shishen-summary-item {
  min-width: 0;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
}

.shishen-summary-item + .shishen-summary-item {
  border-left: 1px solid #f0f0f3;
}

.shishen-summary-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.shishen-summary-label {
  color: #57534e;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}

.shishen-summary-value {
  color: #2563eb;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
  white-space: nowrap;
}

.section {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #fff;
}

.shishen-section {
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.section-title {
  color: #292524;
  font-size: 16px;
  font-weight: 800;
}

.shishen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 7px;
}

.shishen-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 9px;
  border: 1px solid #eeeef1;
  border-radius: 14px;
  background: #fff;
}

.shishen-card-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: 1.5px;
  border-radius: 11px;
  background: linear-gradient(150deg, #f8d26b, #fff);
}

.shishen-card-body {
  min-width: 0;
  flex: 1;
}

.shishen-card-name {
  overflow: hidden;
  color: #3a3a3c;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shishen-card-meta {
  margin-top: 4px;
  color: #a8a29e;
  font-size: 11px;
  font-weight: 650;
}

/* 资产 */
.assets-shell {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
}

.assets-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.assets-title {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.assets-seller {
  color: #8d95a3;
  font-size: 12px;
}

.assets-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.assets-card {
  overflow: hidden;
  padding: 14px;
  border: 1px solid #e9e1d4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(98, 73, 33, 0.08);
}

.assets-card-wide {
  grid-column: 1 / -1;
}

.assets-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.assets-metric {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid #f1ebdf;
  border-radius: 14px;
  background: #fcfbf8;
}

.assets-metric-label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.assets-metric-value {
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.assets-metric-value.good {
  color: #eb972c;
}

.assets-group {
  margin-top: 10px;
}

.assets-group h3 {
  margin-bottom: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

/* 速度 */
.yuhun-page {
  --yuhun-num: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  width: 100%;
  margin: 0 0 28px;
  padding: 18px 18px 40px;
  border: 1px solid #ece7e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(73, 60, 48, 0.045);
  color: #2a2724;
}

.yuhun-page .card {
  margin-bottom: 14px;
  padding: 18px 2px 4px;
  overflow-x: auto;
  border: 0;
  border-top: 1px solid #ece7e1;
  background: transparent;
}

.yuhun-page > .card:first-child {
  padding-top: 4px;
  border-top: 0;
}

.yuhun-page .card h2 {
  margin: 0 0 10px;
  color: #292524;
  font-size: 16px;
  font-weight: 850;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-item {
  min-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 16px;
  border: 1px solid #ece7e1;
  border-radius: 12px;
  background: #fff;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #f3efe9;
  border-radius: 8px;
  background: #fff;
  color: #44403c;
  font-size: 14px;
  font-weight: 750;
}

.item-spd {
  color: #c43f63;
  font-family: var(--yuhun-num);
  font-size: 13.5px;
  font-weight: 850;
}

/* 副本 */
.pve-report {
  max-width: 100%;
}

.pve-section {
  margin-bottom: 16px;
  padding: 16px 16px 12px;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #fff;
}

.pve-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pve-section-title {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 700;
}

.pve-section-note {
  margin-bottom: 16px;
  color: #a8a29e;
  font-size: 12px;
}

.pve-others {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pve-other-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #faf8f5;
}

.pve-other-hero {
  color: #44403c;
  font-size: 13px;
  font-weight: 600;
}

.pve-other-val {
  color: #44403c;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
}

/* 皮肤和头像框采用主程序公网省流量文字模式 */
.skin-card,
.avatar-card {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.skin-card .card-header,
.avatar-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.skin-card .card-title-wrap,
.avatar-card .card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skin-card .card-title,
.avatar-card .card-title {
  font-size: 17px;
  font-weight: 700;
}

.skin-card .card-count,
.avatar-card .card-count {
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 10px;
  background: #f5f5f7;
  color: #3a3a3c;
  font-size: 14px;
  font-weight: 600;
}

.skin-sub,
.avatar-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 6px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.skin-sub:first-of-type,
.avatar-sub:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sub-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d97706;
}

.sub-title {
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 600;
}

.sub-count {
  color: #6e6e73;
  font-size: 13px;
  font-weight: 600;
}

.skin-name-list,
.avatar-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skin-name-item,
.avatar-name-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.1);
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.skin-name-item::before,
.avatar-name-item::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d97706;
}

/* 可折现公开结果 */
.redeem-card {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.redeem-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.redeem-card .card-title {
  color: #3a3a3c;
  font-size: 17px;
  font-weight: 700;
}

.redeem-card .card-header-right {
  color: #86868b;
  font-size: 12px;
}

.redeem-sections {
  padding: 18px 24px 24px;
}

.redeem-section {
  margin-bottom: 20px;
}

.redeem-section:last-child {
  margin-bottom: 0;
}

.redeem-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e5e0;
}

.redeem-section-accent {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: #f0e8d5;
}

.redeem-section-title {
  color: #3a3a3c;
  font-size: 17px;
  font-weight: 700;
}

.redeem-section-badge {
  padding: 2px 10px;
  border-radius: 100px;
  background: #fdf3e5;
  color: #9a8b7a;
  font-size: 13px;
  font-weight: 600;
}

.redeem-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.redeem-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #faf9f6;
}

.redeem-item-name {
  overflow: hidden;
  color: #3a3a3c;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redeem-item-price {
  flex: 0 0 auto;
  color: #3a3a3c;
  font-size: 14px;
  font-weight: 700;
}

.redeem-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px;
  padding: 24px 0;
  border-top: 1px solid #e8e5e0;
}

.redeem-total-label {
  color: #3a3a3c;
  font-size: 18px;
  font-weight: 800;
}

.redeem-total-val {
  color: #3a3a3c;
  font-size: 26px;
  font-weight: 800;
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-text-size-adjust: 100%;
  }

  .input-area {
    padding: 30px 10px 14px;
  }

  .input-area h1 {
    font-size: 23px;
    letter-spacing: 1px;
  }

  .input-heading {
    margin-bottom: 18px;
  }

  .input-card {
    padding: 6px;
    border-radius: 14px;
  }

  .input-row {
    display: flex;
    gap: 0;
  }

  .input-row input {
    min-width: 0;
    padding: 12px 10px;
    border-radius: 9px;
    font-size: 14px;
  }

  .input-divider {
    display: block;
    height: 26px;
    margin: 0 2px;
  }

  .input-row .btn-clear,
  .input-row .btn-analyze {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
  }

  .input-row .btn-analyze {
    font-size: 14px;
  }

  .contact-row {
    margin-top: 8px;
    font-size: 12px;
  }

  .wechat-contact {
    padding: 4px 5px;
  }


  .group-qr-modal {
    padding: 26px 18px 20px;
  }

  .report-tabs {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 20;
    max-width: none;
    gap: 0;
    padding: 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid #e5e5ea;
    background: rgba(245, 245, 247, 0.96);
    backdrop-filter: blur(10px);
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }

  .report-tabs::-webkit-scrollbar {
    display: none;
  }

  .report-tab {
    min-width: max-content;
    flex: 1 0 auto;
    min-height: 42px;
    padding: 9px 8px;
    border-radius: 7px 7px 0 0;
    font-size: clamp(10.5px, 3vw, 12px);
    line-height: 1.1;
  }

  .report-tab + .report-tab {
    margin-left: -1px;
  }

  .report-wrap {
    width: 100%;
    max-width: none;
    padding: 0 10px calc(76px + env(safe-area-inset-bottom));
  }

  .skin-card .card-header,
  .avatar-card .card-header,
  .redeem-card .card-header {
    align-items: flex-start;
  }

  .shishen-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shishen-summary-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #f0f0f3;
  }

  .shishen-summary-item:nth-child(4) {
    border-top: 1px solid #f0f0f3;
  }

  .assets-top-grid,
  .assets-metrics {
    grid-template-columns: 1fr;
  }

  .yuhun-page {
    padding: 14px 12px 28px;
  }

  .redeem-item-grid {
    grid-template-columns: 1fr;
  }

  .redeem-card .card-header {
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px 0;
  }

  .redeem-sections {
    padding: 18px 12px;
  }

  .redeem-total {
    margin: 0 12px;
  }
}

/* 固定的公开展示适配：数值仍由结果包提供，颜色与布局属于服务器 UI。 */
.public-rarity-fill.rarity-ur { background: #3f7c68; }
.public-rarity-fill.rarity-sp { background: #6ba593; }
.public-rarity-fill.rarity-ssr { background: #4f907c; }
.public-rarity-fill.rarity-collab { background: #9cc0b2; }

.public-shishen-rarity-ur { --shishen-rarity: #b44be0; }
.public-shishen-rarity-sp { --shishen-rarity: #e74e4b; }
.public-shishen-rarity-ssr { --shishen-rarity: #f8d26b; }
.public-shishen-rarity-collab { --shishen-rarity: #f8d26b; }
.public-shishen-rarity-collab-r { --shishen-rarity: #bc86f6; }
.public-shishen-rarity-collab-sr { --shishen-rarity: #79baf2; }

.skin-hero-wrap {
  --skin-hero-border: url("/static/skin-hero-border.62abd9df578653a950ca7de4257c2713b87df2f8f5d8937f21c33a385633cecd.png");
}
.skin-yard-wrap {
  --skin-yard-border: url("/static/skin-yard-border.e1667733c13a241f36e79890d7ffcf3e98a2081c586799715c9fd5b6e8bf7ec8.png");
}

.public-star-color,
.public-star-bg { display: block; }
.public-star-color.star-1,
.public-star-bg.star-1 { background: #eee9dc; }
.public-star-color.star-2,
.public-star-bg.star-2 { background: #e6ddc7; }
.public-star-color.star-3,
.public-star-bg.star-3 { background: #f1d8ae; }
.public-star-color.star-4,
.public-star-bg.star-4 { background: #e8bd8c; }
.public-star-color.star-5,
.public-star-bg.star-5 { background: #dba468; }
.public-star-color.star-6,
.public-star-bg.star-6 { background: #c2803f; }

.public-category-dot.group-skin-yard,
.public-category-dot.group-avatar-figure { background: #059669; }
.public-category-dot.group-skin-battle_theme { background: #2563eb; }
.public-category-dot.group-skin-summon_house { background: #0f766e; }
.public-category-dot.group-skin-intermission { background: #0891b2; }
.public-category-dot.group-skin-onmyoji,
.public-category-dot.group-avatar-dungeon_rank { background: #d97706; }
.public-category-dot.group-skin-limited,
.public-category-dot.group-avatar-rare { background: #7c3aed; }
.public-category-dot.group-skin-season_128 { background: #8b5cf6; }
.public-category-dot.group-skin-premium,
.public-category-dot.group-avatar-duel_rank { background: #dc2626; }
.public-category-dot.group-skin-collection { background: #e11d48; }
.public-category-dot.group-skin-consignment { background: #ca8a04; }
.public-category-dot.group-skin-event { background: #f59e0b; }

/* 公网页面窄屏排版：保持内容结构不变，只让可用宽度被稳定利用。 */
#skinReport .skin-yard-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#skinReport .skin-yard-item {
  width: auto;
  min-width: 0;
  flex: none;
}

/* 表格只连续收紧，不在 640px 突然换成另一套尺寸。 */
#pveReport .pve-table {
  width: 100%;
  min-width: 260px;
  table-layout: fixed;
}

#pveReport .pve-table th {
  padding: clamp(7px, 1.05vw, 9px) clamp(2px, 1vw, 12px);
  font-size: clamp(11.5px, calc(9px + 0.45vw), 13px);
}

#pveReport .pve-table td {
  padding: clamp(7px, 1.05vw, 9px) clamp(2px, 1vw, 12px);
  font-size: clamp(13px, calc(11px + 0.45vw), 15px);
}

#pveReport .pve-table th:first-child,
#pveReport .pve-table td:first-child {
  width: clamp(78px, 18%, 160px);
  padding-left: clamp(4px, 1.2vw, 16px);
  white-space: nowrap;
}

#pveReport .pve-table th:last-child,
#pveReport .pve-table td:last-child {
  width: clamp(48px, 12%, 100px);
}

#pveReport .pve-th-icon {
  width: clamp(14px, 2.2vw, 18px);
  height: clamp(14px, 2.2vw, 18px);
  margin-right: clamp(2px, 0.5vw, 4px);
}

#pveReport .pve-suit-icon {
  width: clamp(18px, 2.8vw, 24px);
  height: clamp(18px, 2.8vw, 24px);
  margin-right: clamp(2px, 0.7vw, 6px);
}

#yuhunReport .card .pos-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#yuhunReport .card .pos-table th,
#yuhunReport .card .pos-table td {
  padding-right: clamp(2px, 0.6vw, 6px);
  padding-left: clamp(2px, 0.6vw, 6px);
  font-size: clamp(12.5px, calc(10.5px + 0.45vw), 15px);
}

#yuhunReport .card .pos-table th:first-child,
#yuhunReport .card .pos-table td:first-child {
  width: clamp(44px, 13%, 96px);
  padding-left: clamp(4px, 1vw, 14px);
}

#yuhunReport .card .pos-table .row-label {
  padding-left: clamp(4px, 1vw, 14px);
  font-size: clamp(12.5px, calc(11px + 0.4vw), 14px);
}

#yuhunReport .card .suit-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#yuhunReport .card .suit-table-scroll:focus-visible {
  outline: 2px solid rgba(184, 134, 11, 0.45);
  outline-offset: 2px;
}

#yuhunReport .card .suit-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

#yuhunReport .card .suit-table th:first-child,
#yuhunReport .card .suit-table td:first-child {
  width: 92px;
}

#yuhunReport .card .suit-table th:nth-child(2),
#yuhunReport .card .suit-table td:nth-child(2) {
  width: 78px;
}

#yuhunReport .card .suit-table thead th:first-child,
#yuhunReport .card .suit-table .suit-name {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fbfaf8;
  white-space: nowrap;
}

#yuhunReport .card .suit-table thead th:nth-child(2),
#yuhunReport .card .suit-table .speed-total {
  position: sticky;
  left: 92px;
  z-index: 3;
  background: #fff;
  white-space: nowrap;
  box-shadow: 5px 0 8px -7px rgba(84, 70, 55, 0.5);
}

#yuhunReport .card .suit-table thead th:first-child,
#yuhunReport .card .suit-table thead th:nth-child(2) {
  z-index: 4;
}

#yuhunReport .card .suit-table .duel-suit-row .suit-name,
#yuhunReport .card .suit-table .duel-suit-row .speed-total {
  background: color-mix(in srgb, var(--duel) 5%, #fff);
}

@media (max-width: 760px) {
  #skinReport .skin-yard-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #pveReport .pve-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  #pveReport .pve-header-left {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }

  #pveReport .pve-stamp {
    width: auto;
    margin: 0 0 0 auto;
    text-align: right;
  }

  #redeemReport .redeem-card .card-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  #redeemReport .redeem-card .card-header-left {
    flex: 0 0 auto;
  }

  #redeemReport .redeem-card .card-header-right {
    width: auto;
    min-width: 0;
    margin-left: auto;
    text-align: right;
  }
}

/*
 * 可折现明细按内容的真实可读宽度切列：卡片宽于 330px 时继续保留两列，
 * 不再沿用主报告 620px 的宽松断点。330px 以下才回到单列。
 */
@container redeem (min-width: 331px) {
  #redeemReport .redeem-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(8px, 2cqi, 12px);
  }
}

/* 两列变窄时先调整卡片内部排版并允许名称换行，不提前牺牲整列。 */
@container redeem (max-width: 620px) {
  #redeemReport .redeem-item {
    grid-template-columns: minmax(0, 1fr);
    min-height: 52px;
    align-content: center;
  }

  #redeemReport .redeem-item-name {
    overflow: visible;
    white-space: normal;
  }

  #redeemReport .redeem-item-foot {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  #yuhunReport .yuhun-page.yuhun-page {
    padding: clamp(10px, 2.5vw, 18px) clamp(10px, 2.5vw, 18px) 32px;
    border: 1px solid #ece7e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(73, 60, 48, 0.045);
  }

  #yuhunReport .yuhun-page .card {
    padding: clamp(14px, 2.5vw, 18px) 2px 4px;
    margin-bottom: clamp(12px, 2vw, 14px);
  }

  #yuhunReport .yuhun-page .card h2 {
    font-size: 16px;
  }

  #yuhunReport .yuhun-page .summary-top {
    flex-wrap: nowrap;
    gap: 8px;
  }

  #yuhunReport .summary-row.summary-row-primary {
    width: auto;
    min-width: 0;
    max-width: 230px;
    flex: 1 1 auto;
  }

  #yuhunReport .yuhun-page .summary-item {
    padding: clamp(6px, 1vw, 7px) clamp(6px, 2.2vw, 16px);
  }

  #yuhunReport .yuhun-page .yuhun-seller {
    font-size: clamp(11px, calc(9px + 0.42vw), 12px);
  }

  #yuhunReport .yuhun-page .detail-title {
    font-size: 15px;
  }

  #yuhunReport .card .suit-table {
    min-width: 560px;
  }

  #yuhunReport .card .suit-table th,
  #yuhunReport .card .suit-table td {
    padding: 5px 4px;
  }

  #yuhunReport .card .suit-table th {
    font-size: 11.5px;
  }

  #yuhunReport .card .suit-table td {
    font-size: 12.5px;
  }

  #yuhunReport .card .suit-table th:first-child,
  #yuhunReport .card .suit-table td:first-child {
    width: 82px;
  }

  #yuhunReport .card .suit-table th:nth-child(2),
  #yuhunReport .card .suit-table td:nth-child(2) {
    width: 70px;
  }

  #yuhunReport .card .suit-table .suit-name {
    padding-left: 6px;
    font-size: 13px;
  }

  #yuhunReport .card .suit-table thead th:nth-child(2),
  #yuhunReport .card .suit-table .speed-total {
    left: 82px;
  }

  #yuhunReport .card .suit-table .speed-total {
    font-size: 15px;
  }

  #yuhunReport .card .suit-table .cell-wrap {
    min-width: 48px;
    min-height: 20px;
    padding: 1px 3px;
  }

  #yuhunReport .card .suit-table .speed-line {
    font-size: 12.5px;
  }

  #yuhunReport .card .suit-table .attr-tag {
    margin-left: 2px;
    font-size: 9.5px;
  }

  #yuhunReport .card .suit-table .pos-count {
    font-size: 9px;
  }

  #yuhunReport .card h2:has(+ .suit-table-scroll)::after {
    content: "左右滑动查看 1–6 号位";
    margin-left: auto;
    color: #a8a29e;
    font-size: 10.5px;
    font-weight: 650;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  #skinReport .skin-yard-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/*
 * Dense image/card surfaces follow their own available width instead of
 * device-width column presets.  auto-fill keeps every row on the same grid
 * lines; an incomplete final row therefore remains left-aligned.
 */
@supports (width: 1cqi) {
  #skinReport .skin-card,
  #avatarReport .avatar-card {
    container-type: inline-size;
  }

  #skinReport .skin-yard-list {
    --public-yard-item-min: clamp(84px, 23%, 216px);
    display: grid;
    grid-template-columns: repeat(
      auto-fill,
      minmax(var(--public-yard-item-min), 1fr)
    );
    gap: clamp(6px, 1.6cqi, 8px);
    grid-auto-flow: row;
    justify-content: start;
  }

  /* 最窄仍保留三列；四张都达到约 100px 后才增加第四列。 */
  @container (max-width: 420px) {
    #skinReport .skin-yard-list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  #skinReport .skin-yard-item {
    width: 100%;
    min-width: 0;
    container-type: inline-size;
  }

  #skinReport .skin-yard-name {
    font-size: clamp(9px, 6cqi, 11px);
  }

  #skinReport .skin-hero-list {
    --public-skin-item-min: clamp(54px, 10.5%, 98px);
    display: grid;
    grid-template-columns: repeat(
      auto-fill,
      minmax(var(--public-skin-item-min), 1fr)
    );
    grid-auto-flow: row;
    justify-content: start;
  }

  #skinReport .skin-hero-item {
    width: 100%;
    min-width: 0;
    flex: none;
    container-type: inline-size;
  }

  #skinReport .skin-hero-wrap {
    padding: 6.25cqi 5cqi 5cqi 12.5cqi;
    font-size: clamp(7px, 15cqi, 12px);
  }

  #skinReport .skin-series-break {
    grid-column: 1 / -1;
  }

  #skinReport .skin-hero-label {
    /* Vertical writing changes container-unit axes; percentages keep it in-frame. */
    top: 6.25%;
    left: 5%;
    font-size: 1em;
  }

  #skinReport .skin-hero-name {
    padding-top: 5cqi;
    font-size: clamp(7px, 13.75cqi, 11px);
  }

  #avatarReport .avatar-list {
    --public-avatar-item-min: clamp(54px, 11.11%, 104px);
    display: grid;
    grid-template-columns: repeat(
      auto-fill,
      minmax(var(--public-avatar-item-min), 1fr)
    );
    grid-auto-flow: row;
    justify-content: start;
  }

  #avatarReport .avatar-item {
    width: 100%;
    min-width: 0;
    container-type: inline-size;
  }

  #avatarReport .avatar-name {
    font-size: clamp(9px, 10cqi, 10px);
  }

  /* 满技能横条只有在每格低于约 130px 时才退成单列。 */
  @container shishen-cards (min-width: 268px) {
    #report .shishen-progress-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px clamp(8px, 3cqi, 12px);
    }
  }

  #pveReport .boss-score-section {
    container: public-boss-score / inline-size;
  }

  @container public-boss-score (max-width: 760px) {
    #pveReport .boss-score-grid {
      --public-boss-card-min: clamp(112px, 22cqi, 168px);
      grid-template-columns: repeat(
        auto-fill,
        minmax(var(--public-boss-card-min), 1fr)
      );
      gap: clamp(8px, 1.4cqi, 12px);
      justify-content: start;
    }

    #pveReport .boss-score-grid .boss-card {
      width: 100%;
      max-width: none;
      justify-self: stretch;
      container-type: inline-size;
    }

    #pveReport .boss-card-head {
      gap: clamp(4px, 4cqi, 8px);
      padding: clamp(6px, 5cqi, 10px) clamp(7px, 6cqi, 12px);
    }

    #pveReport .boss-card-title {
      gap: clamp(4px, 4cqi, 8px);
    }

    #pveReport .boss-card .official-badge {
      width: clamp(24px, 20cqi, 38px);
      height: clamp(24px, 20cqi, 38px);
      flex-basis: clamp(24px, 20cqi, 38px);
    }

    #pveReport .boss-card-suit {
      font-size: clamp(9.5px, 7.2cqi, 13.5px);
    }

    #pveReport .boss-card-score {
      padding: 2px clamp(5px, 5cqi, 9px);
      font-size: clamp(9.5px, 7.4cqi, 14px);
    }

    #pveReport .boss-card-meta {
      gap: clamp(6px, 4cqi, 8px);
      padding: clamp(6px, 4.5cqi, 9px) clamp(8px, 6cqi, 12px);
    }

    #pveReport .boss-card-main,
    #pveReport .boss-card-main-label {
      font-size: clamp(9.5px, 6.6cqi, 12.5px);
    }

    #pveReport .boss-card-list {
      padding: clamp(5px, 4cqi, 8px) clamp(8px, 6cqi, 12px);
    }

    #pveReport .boss-card-row {
      gap: clamp(6px, 4cqi, 8px);
      padding: clamp(2px, 1.8cqi, 3.5px) 0;
    }

    #pveReport .boss-card-attr,
    #pveReport .boss-card-val {
      font-size: clamp(9.5px, 6.6cqi, 12.5px);
    }

    #pveReport .boss-card-footer {
      gap: clamp(6px, 4cqi, 8px);
      padding: clamp(6px, 4.5cqi, 9px) clamp(8px, 6cqi, 12px);
    }

    #pveReport .boss-card-footer span,
    #pveReport .boss-card-footer strong {
      font-size: clamp(8.5px, 6cqi, 11.5px);
    }
  }
}

.error-box.processing-notice {
  color: #7a6c58;
  background: #faf7f2;
  border-color: #e6d9c5;
}

/* Local query history dialog. */
#query-history-button {
  margin-left: auto;
}

#query-history-button, .appreciation-button {
  flex: 0 0 auto;
  padding: 4px 9px;
  min-height: 30px;
  border: 1px solid #ddd5c9;
  border-radius: 6px;
  background: transparent;
  color: #755b32;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
#query-history-button:hover, .appreciation-button:hover { background: #f2e9da; border-color: #bca57e; }
#query-history-button:active, .appreciation-button:active { background: #e9ddc9; }
.query-history {
  width: min(680px, calc(100% - 40px)); max-width: none;
  max-height: 70vh; max-height: 70dvh; margin: auto; padding: 0;
  border: 1px solid #e5e5ea; border-radius: 16px; background: #fff; color: #292724;
  box-shadow: 0 20px 64px #0002;
}
.query-history[open] { display: flex; flex-direction: column; }
.query-history::backdrop { background: #20202059; }
body.query-history-opened { overflow: hidden; }
.query-history-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: 12px 16px; border-bottom: 1px solid #efefef; }
.query-history-header h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; }
.query-history button { font: inherit; border: 0; background: transparent; cursor: pointer; }
#query-history-clear, #query-history-close { padding: 5px 10px; min-height: 32px; border: 1px solid #ddd5c9; border-radius: 6px; font-size: 13px; color: #625b51; }
#query-history-clear:hover:not(:disabled), #query-history-close:hover { background: #f5f1eb; }
#query-history-clear:disabled { opacity: .45; cursor: default; }
.query-history-list { container-type: inline-size; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 16px; }
.query-history-item { display: flex; align-items: center; min-width: 0; border-bottom: 1px solid #efefef; }
.query-history-item:last-child { border-bottom: 0; }
.query-history-open { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 0; text-align: left; color: #373430; }
.query-history-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-history-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; font-size: 12px; color: #68615a; }
.query-history-metrics span { white-space: nowrap; }
@container (min-width: 560px) {
  .query-history-open { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .query-history-metrics { grid-column: 2; grid-row: 1; grid-template-columns: repeat(4, auto); }
}
.query-history-details { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; font-size: 12px; color: #787570; }
.query-history-server { overflow-wrap: anywhere; }
.query-history-time { white-space: nowrap; }
.query-history .query-history-remove { flex: 0 0 44px; height: 44px; margin-left: 8px; font-size: 20px; color: #8b8781; }
.query-history-open:hover .query-history-name { color: #806348; }
.query-history-empty { padding: 40px 0; text-align: center; color: #787570; font-size: 14px; }
.query-history-note { margin-top: 8px; font-size: 12px; color: #858078; }
#query-history-dialog-notice { padding: 8px 16px 16px; margin: 0; }
.history-result-note { max-width: 960px; margin: 12px auto; padding: 0 20px; }
.query-history button:focus-visible, #query-history-button:focus-visible, .appreciation-button:focus-visible { outline: 2px solid #80632f; outline-offset: -2px; border-radius: 4px; }
/* The site's long seller names must not push the PVE header outside the viewport. */
#pveReport .pve-header { flex-wrap: wrap; gap: 8px 16px; }
#pveReport .pve-header-left { min-width: 0; flex: 1 1 240px; }
#pveReport .pve-stamp { flex: 1 1 180px; min-width: 0; max-width: 100%; margin-left: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .query-history { width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .query-history-header { padding: 8px 12px; }
  .query-history-list { padding: 0 16px; }
  #pveReport .pve-header { display: block; }
  #pveReport .pve-stamp { margin-top: 8px; text-align: left; }
}

/* Keep PVE summary chips proportional to the compact mobile soul cards. */
@media (max-width: 600px) {
  #pveReport .boss-score-summary { gap: 6px; }
  #pveReport .boss-score-chip {
    min-width: 0;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 7px;
  }
  #pveReport .boss-score-chip-label { font-size: 11px; }
  #pveReport .boss-score-chip-count { font-size: 12px; font-weight: 600; }
  #pveReport .boss-score-tabs { gap: 6px; margin-bottom: 10px; }
  #pveReport .boss-score-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 12px;
  }
  #pveReport .boss-score-tab span { margin-left: 0; font-weight: 600; }
}

/* Keep the analysis heading and seller details aligned independently. */
#pveReport .pve-analysis-header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 8px 16px;
  margin-bottom: 12px;
}
#pveReport .pve-analysis-header .pve-header-left { width: auto; }
#pveReport .pve-analysis-header .pve-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
#pveReport .pve-analysis-mode { font-size: 12px; font-weight: 400; color: #86868b; }
#pveReport .pve-analysis-header .pve-section-note { margin-bottom: 0; }
#pveReport .pve-analysis-header .pve-stamp { margin: 0; text-align: right; }
@media (max-width: 360px) {
  #pveReport .pve-analysis-header { grid-template-columns: minmax(0, 1fr); }
  #pveReport .pve-analysis-header .pve-stamp { text-align: left; }
}

/* Top-level author support stays separate from the analysis action. */
.heading-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  width: 100%;
}
.heading-actions .auth-area {
  flex-wrap: wrap;
  justify-content: center;
}
.appreciation-dialog {
  margin: auto;
  width: min(390px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px 20px 20px;
  overflow-y: auto;
  border: 1px solid #e5d7ba;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 50px #1d1d1f33;
}
.appreciation-dialog::backdrop {
  background: #1d1d1f7a;
}
.appreciation-dialog h2 {
  margin-bottom: 4px;
  color: #7a6d5a;
  font-size: 20px;
  line-height: 1.35;
}
.appreciation-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 14px auto;
}
body:has(.appreciation-dialog[open]) {
  overflow: hidden;
}

/* Website score rows: keep all three figures on one line. These overrides
   live outside the generated main-report.css so report syncs preserve them. */
.account-scoring-current .account-overview-section .account-overview-score-chip {
  align-items: center;
}
.account-scoring-current .account-overview-section .account-overview-score-chip-copy {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
}
.account-scoring-current .account-overview-section .account-overview-run {
  font-variant-numeric: tabular-nums;
}
@container account-overview (max-width: 420px) {
  .account-scoring-current .account-overview-section .account-overview-score-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-scoring-current .account-overview-section .account-overview-score-chip:nth-last-child(2) {
    border-bottom: 1px solid var(--overview-line-soft);
  }
}
