:root {
  --color-ink: #5C4A42;
  --color-muted: #9A8A82;
  --color-soft: #B8A99F;
  --color-page: #FBF7F2;
  --color-surface: #FFFFFF;
  --color-panel: #FDFAF6;
  --color-primary: #7FB8A6;
  --color-primary-deep: #5D9B89;
  --color-primary-soft: #E4F1EB;
  --color-rose: #E89B9B;
  --color-rose-deep: #D47777;
  --color-rose-soft: #FBE4E4;
  --color-gold: #D4A574;
  --color-gold-soft: #F5E6D3;
  --color-lavender: #B8A9C9;
  --color-lavender-soft: #EDE7F3;
  --color-danger: #E07A7A;
  --color-border: #EDE0D6;
  --shadow-soft: 0 20px 50px rgba(92, 74, 66, 0.08);
  --shadow-tight: 0 8px 24px rgba(92, 74, 66, 0.06);
  --shadow-glow: 0 4px 20px rgba(127, 184, 166, 0.15);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --color-ink: #E8DFD8;
  --color-muted: #A99B92;
  --color-soft: #7C7069;
  --color-page: #1A1614;
  --color-surface: #24201C;
  --color-panel: #1E1A17;
  --color-primary: #8BC9B5;
  --color-primary-deep: #A8D8C8;
  --color-primary-soft: rgba(139, 201, 181, 0.15);
  --color-rose: #F0A5A5;
  --color-rose-deep: #F5B8B8;
  --color-rose-soft: rgba(240, 165, 165, 0.15);
  --color-gold: #E0B88A;
  --color-gold-soft: rgba(224, 184, 138, 0.15);
  --color-lavender: #C9B8DC;
  --color-lavender-soft: rgba(201, 184, 220, 0.15);
  --color-danger: #F09090;
  --color-border: #352E29;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.3);
  --shadow-tight: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 4px 20px rgba(139, 201, 181, 0.2);
}

[data-palette="mint"] {
  --color-primary: #7FB8A6;
  --color-primary-deep: #5D9B89;
  --color-primary-soft: #E4F1EB;
  --shadow-glow: 0 4px 20px rgba(127, 184, 166, 0.15);
}
[data-theme="dark"][data-palette="mint"] {
  --color-primary: #8BC9B5;
  --color-primary-deep: #A8D8C8;
  --color-primary-soft: rgba(139, 201, 181, 0.15);
  --shadow-glow: 0 4px 20px rgba(139, 201, 181, 0.2);
}

[data-palette="peach"] {
  --color-primary: #E89B9B;
  --color-primary-deep: #D47777;
  --color-primary-soft: #FBE4E4;
  --color-rose: #E89B9B;
  --color-rose-deep: #D47777;
  --color-rose-soft: #FBE4E4;
  --shadow-glow: 0 4px 20px rgba(232, 155, 155, 0.15);
}
[data-theme="dark"][data-palette="peach"] {
  --color-primary: #F0A5A5;
  --color-primary-deep: #F5B8B8;
  --color-primary-soft: rgba(240, 165, 165, 0.15);
  --color-rose: #F0A5A5;
  --color-rose-deep: #F5B8B8;
  --color-rose-soft: rgba(240, 165, 165, 0.15);
  --shadow-glow: 0 4px 20px rgba(240, 165, 165, 0.2);
}

[data-palette="apricot"] {
  --color-primary: #E8B88A;
  --color-primary-deep: #D49966;
  --color-primary-soft: #FBEBD9;
  --color-gold: #D4A574;
  --color-gold-soft: #F5E6D3;
  --shadow-glow: 0 4px 20px rgba(232, 184, 138, 0.15);
}
[data-theme="dark"][data-palette="apricot"] {
  --color-primary: #ECC99A;
  --color-primary-deep: #F0D4AE;
  --color-primary-soft: rgba(236, 201, 154, 0.15);
  --color-gold: #E0B88A;
  --color-gold-soft: rgba(224, 184, 138, 0.15);
  --shadow-glow: 0 4px 20px rgba(236, 201, 154, 0.2);
}

[data-palette="lavender"] {
  --color-primary: #B8A9C9;
  --color-primary-deep: #9A8AB0;
  --color-primary-soft: #EDE7F3;
  --color-lavender: #B8A9C9;
  --color-lavender-soft: #EDE7F3;
  --shadow-glow: 0 4px 20px rgba(184, 169, 201, 0.15);
}
[data-theme="dark"][data-palette="lavender"] {
  --color-primary: #C9B8DC;
  --color-primary-deep: #D8CAE8;
  --color-primary-soft: rgba(201, 184, 220, 0.15);
  --color-lavender: #C9B8DC;
  --color-lavender-soft: rgba(201, 184, 220, 0.15);
  --shadow-glow: 0 4px 20px rgba(201, 184, 220, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-page);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(232, 155, 155, 0.06), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(127, 184, 166, 0.06), transparent 40%),
    var(--color-page);
  color: var(--color-ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

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

button,
input,
textarea {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

button,
.nav-item,
.text-button,
.brand {
  -webkit-user-select: none;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-rose) 50%, transparent);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--color-page) 88%, transparent);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-rose));
  color: #fff;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0;
  font-weight: 700;
  font-size: 17px;
}

.brand small {
  color: var(--color-muted);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 400;
}

.header-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.header-back:hover {
  background: var(--color-primary);
  color: #fff;
}

.header-spacer {
  width: 40px;
  flex-shrink: 0;
}

body[data-view="analysis"] .header-back {
  display: inline-flex;
}

body[data-view="analysis"] .brand {
  pointer-events: none;
}

body[data-view="analysis"] .brand small {
  display: none;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 20px calc(80px + env(safe-area-inset-bottom, 0px));
}

.view {
  display: none;
  animation: fadeInUp 0.35s ease;
}

.view.active {
  display: block;
}

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

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(336px, 0.96fr);
  gap: 20px;
  align-items: stretch;
  margin: 8px 0 20px;
}

.hero-copy {
  position: relative;
  min-height: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--color-border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(127, 184, 166, 0.10), transparent 40%),
    linear-gradient(180deg, var(--color-surface), var(--color-panel));
  box-shadow: var(--shadow-soft);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 30px 30px auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-rose-soft), transparent 70%);
  opacity: 0.7;
}

.hero-copy::after {
  content: "";
  position: absolute;
  left: -20px;
  bottom: -20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-soft), transparent 70%);
  opacity: 0.6;
}

.search-card,
.panel,
.truth-bench {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tight);
}

.search-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  border-radius: var(--radius-lg);
}

.search-kicker {
  align-self: flex-start;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-rose-soft);
  color: var(--color-rose-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-primary-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 12em;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--color-ink);
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
}

.hero-copy h1 {
  font-size: 32px;
  line-height: 1.2;
  max-width: 14em;
}

.hero-copy p:not(.eyebrow) {
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 520px;
  font-weight: 400;
}

.proof-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 520px;
}

.proof-rail span {
  min-height: 56px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-page) 70%, var(--color-surface));
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
}

.proof-rail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-rose-deep);
  font-size: 12px;
  font-weight: 600;
}

.search-card label,
.panel label {
  display: grid;
  gap: 8px;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 600;
}

.panel label + label {
  margin-top: 14px;
}

textarea,
input {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  color: var(--color-ink);
  padding: 12px 14px;
  resize: vertical;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

textarea {
  min-height: 120px;
}

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

.field-label-row label {
  margin-bottom: 0;
}

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  min-height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary-deep);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  flex-shrink: 0;
}

.paste-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

.paste-btn:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.paste-btn:active {
  transform: scale(0.96);
}

.paste-btn.pasted {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

textarea::placeholder,
input::placeholder {
  color: var(--color-soft);
  font-weight: 400;
}

.form-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  font-size: 15px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep));
  color: #fff;
  box-shadow: 0 6px 20px rgba(127, 184, 166, 0.25);
}

.btn.primary:hover {
  box-shadow: 0 8px 24px rgba(127, 184, 166, 0.32);
}

.btn.secondary {
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
}

.btn.secondary:hover {
  background: color-mix(in srgb, var(--color-primary-soft) 80%, var(--color-primary) 20%);
}

.btn.ghost {
  background: transparent;
  color: var(--color-primary-deep);
  border: 1.5px solid var(--color-border);
}

.btn.ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.btn.danger {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  color: var(--color-danger);
}

.btn.danger:hover {
  background: color-mix(in srgb, var(--color-danger) 20%, transparent);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--color-primary-deep);
  font-weight: 600;
  padding: 0;
  margin: 0 0 16px;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--color-rose-deep);
}

.support-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}

.support-strip span {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.support-strip span:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-deep);
  background: var(--color-primary-soft);
}

.section-block {
  padding: 0;
  margin: 36px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

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

.product-card {
  position: relative;
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.product-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
}

.product-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.stack-list {
  display: grid;
  gap: 12px;
}

.stack-list > .panel,
.data-panel {
  padding: 22px;
  border-radius: var(--radius);
}

.truth-bench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  border-color: color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--color-primary-soft) 50%, transparent), transparent 45%),
    var(--color-surface);
}

.truth-bench.level-history_low,
.truth-bench.level-recent_low {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--color-primary-soft) 60%, transparent), transparent 50%),
    var(--color-surface);
}

.truth-bench.level-expensive {
  border-color: color-mix(in srgb, var(--color-rose) 40%, var(--color-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--color-rose-soft) 50%, transparent), transparent 50%),
    var(--color-surface);
}

.truth-bench h1 {
  max-width: none;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
}

.truth-bench p {
  color: var(--color-muted);
  line-height: 1.7;
  font-size: 15px;
}

.truth-bench strong {
  color: var(--color-ink);
  font-size: 24px;
  font-weight: 700;
}

.current-price-display {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 18px;
  background: var(--color-rose-soft);
  border-radius: var(--radius-sm);
}

.current-price-display .price-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-rose-deep);
}

.current-price-display .price-label {
  font-size: 13px;
  color: var(--color-rose-deep);
  font-weight: 500;
}

.truth-bench ul {
  margin: 14px 0 0;
  padding-left: 0;
  color: var(--color-muted);
  line-height: 1.8;
  list-style: none;
}

.truth-bench ul li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
}

.truth-bench ul li::before {
  content: "·";
  position: absolute;
  left: 8px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  top: 2px;
}

.score-column {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.score-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background:
    conic-gradient(var(--score-color, var(--color-primary)) calc(var(--score, 0) * 1%), var(--color-border) 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--color-border), var(--shadow-glow);
  transition: all 0.3s ease;
}

.score-ring span {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--color-surface);
  display: grid;
  place-items: center;
  color: var(--color-ink);
  font-size: 32px;
  font-weight: 700;
  position: relative;
}

.score-ring span::after {
  content: "分";
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  margin-left: 2px;
}

.level-history_low .score-ring,
.level-recent_low .score-ring {
  --score-color: var(--color-primary);
}

.level-expensive .score-ring {
  --score-color: var(--color-rose);
}

.level-normal .score-ring {
  --score-color: var(--color-gold);
}

.range-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.range-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.range-tabs button:hover {
  color: var(--color-ink);
}

.range-tabs button.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep));
  color: #fff;
  box-shadow: 0 2px 8px rgba(127, 184, 166, 0.25);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-grid .panel {
  padding: 24px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-grid .panel:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.chart-panel {
  min-height: 280px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
  padding: 8px;
}

.price-chart-svg {
  width: 100%;
  height: 280px;
  display: block;
}

.chart-axis {
  stroke: var(--color-border);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: url(#chartGradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartAreaGradient);
  opacity: 0.4;
}

.chart-points circle {
  fill: var(--color-surface);
  stroke: var(--color-primary);
  stroke-width: 2.5;
  transition: r 0.2s ease, stroke-width 0.2s ease;
}

.chart-points circle:hover {
  r: 6;
  stroke-width: 3;
}

.chart-label {
  fill: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
}

.chart-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.chart-empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  display: block;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 12px rgba(92, 74, 66, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  flex: 1;
  max-width: 100px;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--color-muted);
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.25s ease;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover {
  color: var(--color-ink);
  background: var(--color-primary-soft);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep));
  color: #fff;
  box-shadow: 0 4px 14px rgba(127, 184, 166, 0.3);
}

.nav-item.active svg {
  stroke: #fff;
}

body[data-view="analysis"] .bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  width: auto;
  margin: 0;
}

.form-message,
.fine-print {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
}

.sample-hint {
  text-align: center;
  color: var(--color-primary-deep);
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 0;
  font-weight: 500;
}

.analysis-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  min-height: 36px;
  font-size: 14px;
}

.back-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.analysis-page-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--color-ink);
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.action-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.action-card-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.action-card-head .fine-print {
  margin: 0;
}

.file-button input {
  display: none;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.empty-state-text {
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}

.empty-state-action {
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }

  .view {
    animation: none;
  }
}

@media (max-width: 920px) {
  .hero-panel,
  .truth-bench,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

  .truth-bench h1 {
    font-size: 28px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .score-column {
    justify-items: center;
  }

  .truth-bench {
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .app-header {
    padding: 12px 16px;
  }

  .brand small {
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-shell {
    padding: 12px 16px 110px;
  }

  .hero-panel {
    gap: 16px;
    margin: 4px 0 16px;
  }

  .hero-copy,
  .search-card,
  .truth-bench,
  .detail-grid .panel,
  .stack-list > .panel,
  .data-panel,
  .product-card {
    padding: 20px;
  }

  .hero-copy::before {
    width: 80px;
    height: 80px;
    opacity: 0.5;
  }

  .hero-copy::after {
    width: 120px;
    height: 120px;
    opacity: 0.4;
  }

  h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-copy h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .proof-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 20px;
  }

  .proof-rail span {
    min-height: 48px;
    padding: 10px 8px;
    font-size: 11px;
  }

  .bottom-nav {
    width: 100%;
    left: 0;
    right: 0;
    justify-content: space-around;
    border-radius: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }

  body[data-view="analysis"] .bottom-nav {
    width: 100%;
  }

  .nav-item {
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
    font-size: 11px;
    min-height: 44px;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .score-ring {
    width: 120px;
    height: 120px;
  }

  .score-ring span {
    width: 88px;
    height: 88px;
    font-size: 28px;
  }

  .current-price-display .price-value {
    font-size: 26px;
  }

  .analysis-top-bar {
    margin-bottom: 16px;
  }

  .analysis-page-title {
    font-size: 16px;
  }

  .back-btn {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 13px;
  }

  .action-card-head h3 {
    font-size: 16px;
  }
}

.settings-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 4px 16px;
  margin-bottom: 20px;
}

.settings-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
  margin: 14px 4px 10px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item.danger .setting-title {
  color: var(--color-danger);
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 2px;
}

.setting-desc {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
}

.setting-item.theme-setting,
.setting-item.palette-setting {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 4px;
}

.setting-item.theme-setting .theme-options,
.setting-item.palette-setting .palette-options {
  align-self: stretch;
}

.setting-version {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.theme-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  font-size: 13px;
  color: var(--color-muted);
  transition: all 0.2s ease;
}

.theme-options label:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
  font-weight: 500;
}

.theme-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-options label:has(input:focus-visible),
.palette-options label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--color-rose) 50%, transparent);
  outline-offset: 2px;
}

.palette-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.palette-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.palette-options label:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.palette-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.palette-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.palette-swatch.mint {
  background: linear-gradient(135deg, #7FB8A6, #5D9B89);
}

.palette-swatch.peach {
  background: linear-gradient(135deg, #E89B9B, #D47777);
}

.palette-swatch.apricot {
  background: linear-gradient(135deg, #E8B88A, #D49966);
}

.palette-swatch.lavender {
  background: linear-gradient(135deg, #B8A9C9, #9A8AB0);
}

.palette-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
}

.feedback-setting .setting-desc {
  word-break: break-all;
}

.picks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.pick-card {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.pick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-tight);
  border-color: var(--color-primary);
}

.pick-card .pick-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-rose-soft);
  color: var(--color-rose-deep);
}

.pick-card .pick-badge.low-price {
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
}

.pick-card .pick-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pick-card .pick-platform {
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.pick-card .pick-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary-deep);
}

.pick-card .pick-price .pick-original {
  font-size: 12px;
  color: var(--color-soft);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

.picks-tip {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  margin: 8px 0 24px;
  padding: 10px;
  background: var(--color-panel);
  border-radius: var(--radius-sm);
}

@media (max-width: 600px) {
  .palette-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .picks-grid {
    gap: 10px;
  }

  .pick-card {
    padding: 10px;
  }

  .pick-card .pick-price {
    font-size: 16px;
  }

  .settings-group {
    padding: 4px 12px;
  }

  .setting-item {
    padding: 12px 4px;
  }
}
