/* ---------- Tokens ---------- */
:root {
  --bg: #07090b;
  --bg-elev: #0b0e12;
  --panel: #0d1116;
  --panel-2: #11161d;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9eef4;
  --muted: #8d97a8;
  --muted-2: #6b7686;
  --accent: #7ef0c0;
  --accent-strong: #a5f7d3;
  --accent-ink: #05261b;
  --accent-soft: rgba(126, 240, 192, 0.1);
  --violet: #a99bff;
  --warn: #ffc46b;
  --danger: #ff8b82;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
svg { display: block; }

.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;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 72%);
}

.bg-glow {
  position: fixed;
  top: -320px;
  left: 50%;
  width: min(1100px, 120vw);
  height: 700px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(126, 240, 192, 0.13), transparent 70%),
    radial-gradient(closest-side, rgba(169, 155, 255, 0.1), transparent 72%);
  filter: blur(20px);
  opacity: 0.9;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 70px;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(7, 9, 11, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark { color: var(--accent); }

.brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 5px 26px 5px 12px;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12' fill='none' stroke='%238d97a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: 0;
}

.lang-select option {
  background: #0d1116;
  color: var(--text);
}

/* ---------- Hero ---------- */
main {
  position: relative;
  z-index: 1;
  padding: 0 clamp(20px, 4vw, 48px);
}

.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 104px) 0 0;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 12px;
  border: 1px solid rgba(126, 240, 192, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(126, 240, 192, 0.55);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126, 240, 192, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(126, 240, 192, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 240, 192, 0); }
}

.hero-title {
  margin: 26px 0 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-wrap: balance;
}

.hero-title em {
  display: block;
  font-style: normal;
  background: linear-gradient(96deg, #eafff6 8%, var(--accent) 46%, var(--violet) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Scan form ---------- */
.scan {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 660px;
  margin: 34px auto 0;
  padding: 9px 9px 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 25, 32, 0.96), rgba(12, 16, 21, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 24px 60px -28px rgba(0, 0, 0, 0.9);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}

.scan:focus-within {
  border-color: rgba(126, 240, 192, 0.5);
  box-shadow:
    0 0 0 4px rgba(126, 240, 192, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 70px -30px rgba(0, 0, 0, 0.95);
}

.scan-icon { color: var(--muted-2); flex: none; }

.scan input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  letter-spacing: -0.005em;
}

.scan input::placeholder { color: #7f8899; }

.scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #a6f8d5, #74e6b7);
  color: var(--accent-ink);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px -14px rgba(126, 240, 192, 0.85);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, opacity 0.2s ease;
}

.scan-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(126, 240, 192, 0.9);
}

.scan-btn:active:not(:disabled) { transform: translateY(0); }

.scan-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.scan-btn .btn-arrow { transition: transform 0.2s var(--ease); }
.scan-btn:hover:not(:disabled) .btn-arrow { transform: translateX(2px); }

/* ---------- Examples & trust ---------- */
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.examples-label {
  color: var(--muted-2);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 13.5px;
  font-family: var(--mono);
  letter-spacing: -0.01em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 42px auto 0;
  text-align: left;
}

.trust li {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.trust-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.trust li strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.trust li span span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---------- Result shell ---------- */
.result {
  max-width: var(--max);
  margin: 0 auto;
  scroll-margin-top: 92px;
}

.result:not(:empty) { margin-top: 56px; }

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(126, 240, 192, 0.055), transparent 58%),
    var(--panel);
  overflow: hidden;
  animation: rise 0.55s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Loading ---------- */
.loading-card {
  padding: 30px clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  animation: fade 0.3s ease both;
}

.loading-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 15px;
  font-weight: 600;
}

.loading-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}

.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.loading-steps span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 12px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.loading-steps span.is-active {
  color: var(--accent);
  border-color: rgba(126, 240, 192, 0.3);
  background: var(--accent-soft);
}

.skeleton {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.sk {
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 20%, rgba(255, 255, 255, 0.07) 40%, rgba(255, 255, 255, 0.035) 62%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.sk-a { height: 168px; }
.sk-b { height: 168px; }
.sk-c { height: 74px; grid-column: 1 / -1; }

@keyframes shimmer {
  from { background-position: 140% 0; }
  to { background-position: -60% 0; }
}

/* ---------- Store header ---------- */
.store-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.store-id { min-width: 0; flex: 1 1 240px; }

.store-id h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-id a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--mono);
  transition: color 0.2s ease;
}
.store-id a:hover { color: var(--accent); }
.store-id a svg { flex: none; }

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge.is-platform {
  border-color: rgba(126, 240, 192, 0.3);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 550;
}

.badge.is-muted { color: var(--muted-2); }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Theme panel ---------- */
.theme-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(26px, 3.4vw, 40px) clamp(20px, 3vw, 34px);
}

.panel-label {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.theme-name {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  word-break: break-word;
}

.theme-kind {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-kind.is-official {
  border: 1px solid rgba(126, 240, 192, 0.34);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.theme-kind.is-custom {
  border: 1px solid rgba(169, 155, 255, 0.32);
  background: rgba(169, 155, 255, 0.1);
  color: #cfc6ff;
}

.theme-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
  word-break: break-word;
}

.theme-sub code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
}

.theme-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--line);
}

.theme-metrics > div {
  padding: 12px 14px;
  background: var(--panel);
}

.theme-metrics dt {
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.theme-metrics dd {
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 560;
  font-family: var(--mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.theme-link:hover {
  border-color: rgba(126, 240, 192, 0.4);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ---------- Quick facts ---------- */
.quick-facts {
  align-self: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.quick-facts .panel-label { margin-bottom: 12px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.fact dt {
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact dd {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.fact dd.is-mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fact.is-wide { grid-column: 1 / -1; }

/* ---------- Notes ---------- */
.notes {
  display: grid;
  gap: 8px;
  padding: 0 clamp(20px, 3vw, 34px) clamp(22px, 3vw, 30px);
}

.notes li {
  display: flex;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 196, 107, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 196, 107, 0.055);
  color: #e7d5b6;
  font-size: 13.5px;
  line-height: 1.55;
}

.notes svg { flex: none; margin-top: 2px; color: var(--warn); }

/* ---------- Apps ---------- */
.section-block {
  padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--line);
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.block-head h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.5;
}

.block-head span {
  color: var(--muted-2);
  font-size: 12.5px;
  font-family: var(--mono);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 10px;
}

.apps-scope {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s var(--ease), background 0.2s ease;
}

.app-card:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-1px);
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-name {
  font-size: 14.5px;
  font-weight: 570;
  letter-spacing: -0.01em;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.app-ver {
  margin-left: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.app-cat {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.empty-line {
  color: var(--muted-2);
  font-size: 14px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13.5px;
}

.tech-chip small {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Evidence ---------- */
.evidence {
  border-top: 1px solid var(--line);
}

.evidence summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px clamp(20px, 3vw, 34px);
  color: var(--muted);
  font-size: 14.5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s ease;
}

.evidence summary::-webkit-details-marker { display: none; }
.evidence summary:hover { color: var(--text); }

.evidence summary .plus {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  margin-left: auto;
}

.evidence summary .plus::before,
.evidence summary .plus::after {
  content: "";
  position: absolute;
  inset: 6px 0 auto;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.evidence summary .plus::after { transform: rotate(90deg); }
.evidence[open] summary .plus::after { transform: rotate(0deg); }

.evidence-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
  padding: 0 clamp(20px, 3vw, 34px) clamp(24px, 3vw, 32px);
}

.evidence-block {
  min-width: 0;
}

.evidence-block.is-wide {
  grid-column: 1 / -1;
}

.evidence-block h4 {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.evidence-list {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
}

.evidence-list li {
  padding-left: 12px;
  position: relative;
  overflow-wrap: anywhere;
}

.evidence-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
}

.evidence-list li.is-strong { color: var(--text); }

.kv {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 4px 12px;
  font-size: 13px;
  font-family: var(--mono);
}

.kv dt { color: var(--muted-2); }
.kv dd { color: var(--muted); overflow-wrap: anywhere; }

pre.code {
  max-height: 240px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #080b0e;
  color: #b9c4d2;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- Error ---------- */
.error-card {
  padding: clamp(28px, 4vw, 44px) clamp(22px, 3vw, 34px);
  border: 1px solid rgba(255, 139, 130, 0.24);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(255, 139, 130, 0.08), transparent 60%),
    var(--panel);
  animation: rise 0.45s var(--ease) both;
}

.error-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 139, 130, 0.12);
  color: var(--danger);
}

.error-code {
  color: var(--danger);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.error-body {
  margin-top: 14px;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn-ghost {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(126, 240, 192, 0.42);
  background: var(--accent-soft);
}

.error-detail {
  margin-top: 16px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

/* ---------- How it works ---------- */
.how {
  max-width: var(--max);
  margin: clamp(80px, 10vw, 118px) auto 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.section-head h2 {
  margin-top: 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
}

.section-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}

.how-card {
  position: relative;
  padding: 24px 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.008));
  transition: border-color 0.25s ease, transform 0.3s var(--ease);
}

.how-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.how-num {
  display: inline-block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.how-card h3 {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.4;
}

.how-card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: var(--max);
  margin: clamp(80px, 10vw, 118px) auto 0;
}

.faq .section-head { max-width: none; }

.faq-list {
  max-width: 860px;
  margin: 38px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--accent-strong); }

.faq-icon {
  position: relative;
  flex: none;
  width: 18px;
  height: 27px;
  color: var(--accent);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 2px;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }

.faq-answer {
  padding: 0 36px 24px 32px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.faq-answer p { max-width: 72ch; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: clamp(72px, 9vw, 110px) auto 0;
  padding: 26px clamp(4px, 1vw, 10px) 46px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  color: var(--muted-2);
  font-size: 12px;
}

.footer-meta { margin-left: auto; }

/* ---------- Focus ---------- */
:where(a, button, input, summary):focus-visible {
  outline: 2px solid rgba(126, 240, 192, 0.65);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Keep Chinese sentences from breaking mid-word */
html[data-lang="zh"] :is(.hero-sub, .section-sub, .how-card p, .faq-answer p, .error-body, .theme-sub, .empty-line, .notes li) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .section-head h2 { font-size: 30px; }
}

@media (max-width: 900px) {
  .theme-panel { grid-template-columns: 1fr; }
  .quick-facts { max-width: none; }
  .how-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; max-width: 460px; }
  .evidence-body { grid-template-columns: 1fr; }
  .evidence-block.is-wide { grid-column: auto; }
}

@media (max-width: 720px) {
  .site-header { height: 62px; padding: 0 18px; }
  main { padding: 0 18px; }
  .hero { padding-top: 56px; }
  .hero-title { font-size: 22px; line-height: 1.3; }
  .hero-title em { font-size: 24px; }
  .hero-sub { margin-top: 18px; font-size: 15px; line-height: 1.7; }
  .section-head h2 { font-size: 26px; }
  .theme-name { font-size: 30px; }
  .faq-list { margin-top: 28px; }
  .faq-answer { padding-right: 0; }
  .scan { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .scan-icon { display: none; }
  .scan input { flex: 1 1 100%; height: 42px; padding: 0 6px; }
  .scan-btn { width: 100%; }
  .skeleton { grid-template-columns: 1fr; }
  .sk-c { grid-column: auto; }
  .store-head { padding: 20px 18px; }
  .theme-panel { padding: 24px 18px; }
  .section-block, .evidence summary, .evidence-body { padding-left: 18px; padding-right: 18px; }
  .notes { padding-left: 18px; padding-right: 18px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-meta { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 420px) {
  .store-id h2 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Platform switcher ---------- */
.platform-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.platform-btn {
  padding: 5px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.2s ease, background 0.2s ease;
}

.platform-btn:hover { color: var(--text); }
.platform-btn.is-active { color: var(--accent); background: var(--accent-soft); }
.platform-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .header-actions { gap: 8px; }
  .brand-name { display: none; }
  .platform-btn { padding: 5px 7px; font-size: 11px; }
}
