:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-warm: #fff7ed;
  --paper: #f7ead9;
  --ink: #2b2118;
  --muted: #806f60;
  --soft: #a69482;
  --line: #ead9c3;
  --line-strong: #dcc4a7;
  --kraft: #c8956d;
  --coffee: #6f4a31;
  --coffee-dark: #3a2519;
  --red: #d84a3a;
  --yellow: #d99a45;
  --blue: #315d82;
  --green: #4d8b71;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(88, 61, 37, 0.12);
  --shadow-soft: 0 10px 24px rgba(88, 61, 37, 0.10);
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  background:
    linear-gradient(90deg, rgba(234, 217, 195, 0.38) 1px, transparent 1px),
    linear-gradient(180deg, rgba(234, 217, 195, 0.32) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf9 0%, #fff8ef 52%, #fffaf4 100%);
  background-size: 52px 52px, 52px 52px, auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: transparent;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
  background: rgba(255, 253, 249, 0.86);
  border-bottom: 1px solid rgba(234, 217, 195, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand-logo {
  width: 76px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.nav a {
  padding: 8px 0;
}

.nav a:hover,
.nav a.active {
  color: var(--coffee-dark);
}

.nav-action {
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: var(--coffee-dark);
  box-shadow: 0 10px 22px rgba(58, 37, 25, 0.18);
}

main {
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 360ms ease both;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  align-items: center;
  gap: 56px;
  min-height: calc(100vh - 190px);
}

.hero-copy h1 {
  max-width: 620px;
  margin: 0;
  font-size: 76px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--coffee-dark);
}

.hero-copy p {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-copy .hero-manifesto {
  max-width: 620px;
  margin-top: 26px;
  color: #4e3828;
  font-size: 22px;
  line-height: 1.65;
  font-weight: 700;
}

.hero-manifesto strong {
  display: block;
  margin-top: 6px;
  color: var(--coffee-dark);
  font-size: 18px;
  font-weight: 900;
}

.hero-copy .hero-description {
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--coffee-dark);
  box-shadow: 0 14px 28px rgba(58, 37, 25, 0.20);
}

.btn-secondary {
  color: var(--coffee-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--coffee);
  box-shadow: var(--shadow-soft);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 500px;
  margin-top: 40px;
}

.hero-facts div {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.hero-facts strong {
  display: block;
  color: var(--coffee-dark);
  font-size: 30px;
  line-height: 1;
}

.hero-facts span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.launch-note {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  background: rgba(255, 253, 249, 0.78);
}

.launch-note strong {
  color: var(--coffee-dark);
  font-size: 14px;
}

.hero-gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.hero-gallery::before {
  position: absolute;
  inset: -14px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(200, 149, 109, 0.22);
  border-radius: var(--radius);
  transform: rotate(-1.5deg);
}

.hero-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(234, 217, 195, 0.92);
  border-radius: var(--radius);
  background: #fff6e7;
  box-shadow: 0 12px 22px rgba(88, 61, 37, 0.10);
}

.hero-gallery picture,
.persona-image picture,
.result-art picture,
.modal-art picture,
.share-card-art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-img-b,
.hero-img-c {
  transform: translateY(20px);
}

.dimension-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.dimension {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.dimension span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--coffee);
  font-size: 13px;
  font-weight: 900;
  background: var(--surface-warm);
}

.dimension h3 {
  margin: 16px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.dimension p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.section-head p {
  margin: 0 0 10px;
  color: var(--kraft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-head h2 {
  margin: 0;
  color: var(--coffee-dark);
  font-size: 44px;
  line-height: 1.12;
}

.section-head span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

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

.tribe-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--tribe);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--tribe-soft) 100%);
  box-shadow: var(--shadow-soft);
}

.tribe-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tribe-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 36px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: var(--tribe);
}

.tribe-top h3 {
  margin: 0;
  color: var(--coffee-dark);
  font-size: 26px;
}

.tribe-card p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.keyword-row,
.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.keyword-row b,
.member-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  color: var(--coffee-dark);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.58);
}

.member-row span {
  border-color: rgba(220, 196, 167, 0.9);
}

.tribe-card em {
  display: block;
  margin-top: 18px;
  color: var(--tribe);
  font-style: normal;
  font-weight: 800;
}

.test-shell {
  max-width: 780px;
  margin: 0 auto;
}

.test-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.progress-track {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #efe1cd;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coffee), var(--kraft));
  transition: width 240ms ease;
}

.question-card {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.question-axis {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--coffee);
  font-size: 13px;
  font-weight: 900;
  background: var(--surface-warm);
}

.question-card h2 {
  margin: 22px 0 30px;
  color: var(--coffee-dark);
  font-size: 30px;
  line-height: 1.45;
}

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

.option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--coffee-dark);
  text-align: left;
  background: #fffdf9;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.option:hover,
.option.selected {
  border-color: var(--kraft);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 900;
  background: var(--coffee-dark);
}

.option b {
  align-self: center;
  font-size: 16px;
  line-height: 1.55;
}

.test-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.text-button {
  color: var(--coffee);
  font-weight: 900;
}

.text-button:disabled {
  color: var(--soft);
  cursor: not-allowed;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.76);
}

.chip:hover,
.chip.active {
  color: #fff;
  border-color: var(--coffee-dark);
  background: var(--coffee-dark);
}

.persona-card {
  min-width: 0;
}

.persona-click {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(88, 61, 37, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.persona-click:hover {
  border-color: var(--tribe);
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.persona-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff4df;
}

.persona-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.persona-click:hover .persona-image img {
  transform: scale(1.035);
}

.persona-image span {
  position: absolute;
  top: 10px;
  left: 10px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 28px;
  background: rgba(58, 37, 25, 0.78);
  backdrop-filter: blur(10px);
}

.persona-info {
  padding: 16px;
}

.persona-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.persona-title h3 {
  min-width: 0;
  margin: 0;
  color: var(--coffee-dark);
  font-size: 18px;
  line-height: 1.3;
}

.persona-title small {
  flex: 0 0 auto;
  color: var(--tribe);
  font-size: 12px;
  font-weight: 900;
}

.persona-info p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.persona-info b {
  display: -webkit-box;
  overflow: hidden;
  color: var(--coffee-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 36px;
  padding: 32px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--tribe);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--tribe-soft) 100%);
  box-shadow: var(--shadow);
}

.result-art {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff4df;
}

.result-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.result-copy span {
  color: var(--tribe);
  font-size: 13px;
  font-weight: 900;
}

.result-copy h1 {
  margin: 10px 0 0;
  color: var(--coffee-dark);
  font-size: 84px;
  line-height: 1;
  letter-spacing: 0;
}

.result-copy h2 {
  margin: 8px 0 0;
  color: var(--coffee-dark);
  font-size: 38px;
  line-height: 1.2;
}

.result-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.result-coffee {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 20px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--coffee);
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.68);
}

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

.result-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.result-block h3 {
  margin: 0 0 12px;
  color: var(--coffee);
  font-size: 14px;
  font-weight: 900;
}

.result-block p,
.result-block li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.result-block p {
  margin: 0;
}

.result-highlight {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #fffdf9, var(--surface-warm));
}

.result-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-block li::before {
  content: "·";
  margin-right: 8px;
  color: var(--coffee);
  font-weight: 900;
}

.product-link {
  display: inline;
  color: var(--coffee-dark);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(111, 74, 49, 0.28);
  text-underline-offset: 3px;
}

.product-link:hover,
.product-link.clicked {
  color: var(--coffee);
}

.rarity-meter {
  display: grid;
  gap: 12px;
}

.rarity-meter span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.rarity-meter b {
  color: var(--tribe);
  font-size: 34px;
  line-height: 1;
}

.rarity-meter small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rarity-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: #efe1cd;
}

.rarity-meter em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tribe);
}

.score-list {
  display: grid;
  gap: 16px;
}

.score-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.score-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.score-list span {
  color: var(--muted);
}

.score-list b {
  color: var(--coffee-dark);
}

.score-bars {
  gap: 22px;
}

.score-bars > .score-axis {
  display: grid;
  grid-template-columns: 108px 112px minmax(260px, 0.95fr) minmax(260px, 1.15fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
}

.score-bars > .score-axis:last-child {
  padding-bottom: 0;
}

.score-axis-head,
.score-poles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.score-bars .score-axis-head {
  display: contents;
}

.score-axis-head span {
  color: var(--coffee-dark);
  font-weight: 650;
}

.score-bars .score-axis-head span {
  grid-column: 1;
  font-size: 1.08rem;
}

.score-axis-head b {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.score-bars .score-axis-head b {
  grid-column: 2;
  white-space: nowrap;
}

.score-scale {
  display: grid;
  grid-column: 3;
  gap: 6px;
  min-width: 0;
}

.score-ticks {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.score-ticks .is-zero {
  color: var(--coffee-dark);
  font-weight: 750;
}

.score-track {
  position: relative;
  height: 2px;
  margin: 7px 0 3px;
  overflow: visible;
  border-radius: 999px;
  background: var(--line-strong);
}

.score-track::before {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 1px;
  height: 12px;
  background: #d8c8b7;
  content: "";
}

.score-track em {
  position: absolute;
  top: 50%;
  left: var(--marker);
  width: 20px;
  height: 20px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--coffee-dark);
  box-shadow: 0 5px 16px rgba(58, 37, 25, 0.24);
  transform: translate(-50%, -50%);
}

.score-poles span {
  color: var(--muted);
  font-size: 0.9rem;
}

.score-axis-note {
  grid-column: 4;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

@media (max-width: 860px) {
  .score-bars > .score-axis {
    grid-template-columns: 96px minmax(90px, auto) minmax(220px, 1fr);
    gap: 12px 16px;
  }

  .score-scale {
    grid-column: 3;
  }

  .score-axis-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .score-bars > .score-axis {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .score-bars .score-axis-head span {
    grid-column: 1;
  }

  .score-bars .score-axis-head b {
    grid-column: 2;
  }

  .score-scale,
  .score-axis-note {
    grid-column: 1 / -1;
  }
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.result-share-strip {
  display: flex;
  justify-content: flex-start;
  padding: 18px 0 0;
}

.result-share-strip .btn {
  min-width: min(100%, 240px);
}

.result-disclaimer {
  max-width: 900px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  text-align: center;
}

.share-page {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.share-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 380px);
  height: min(700px, calc(100svh - 150px));
  min-height: 540px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(73, 57, 43, 0.18);
  border-left: 6px solid var(--tribe);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(247, 244, 237, 0.98), rgba(232, 226, 216, 0.92)),
    var(--tribe-soft);
  box-shadow: var(--shadow);
}

.share-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.share-card-top img {
  width: 72px;
  height: auto;
}

.share-card-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.share-card-art {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 14px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(73, 57, 43, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(247, 244, 237, 0.70), rgba(215, 205, 190, 0.76)),
    #ddd2c3;
}

.share-card-art img {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.96) contrast(1.02);
}

.share-card-copy {
  padding-top: 14px;
}

.share-card-copy span {
  color: var(--tribe);
  font-size: 12px;
  font-weight: 900;
}

.share-card-copy h1 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.share-card-copy h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.2;
}

.share-card-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.share-card-copy b {
  display: block;
  margin-top: 8px;
  color: var(--coffee-dark);
  font-size: 13px;
  line-height: 1.55;
}

.share-card-footer {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(73, 57, 43, 0.16);
}

.share-card-footer span {
  color: var(--coffee-dark);
  font-size: 12px;
  font-weight: 800;
}

.share-card-footer strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.share-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 42px 24px;
  text-align: center;
}

.share-empty h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 33, 24, 0.34);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 26px 60px rgba(43, 33, 24, 0.22);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--coffee-dark);
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.86);
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  padding: 34px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--tribe-soft) 100%);
}

.modal-art {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff4df;
}

.modal-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.modal-copy span {
  color: var(--tribe);
  font-size: 13px;
  font-weight: 900;
}

.modal-copy h2 {
  margin: 8px 0 4px;
  color: var(--coffee-dark);
  font-size: 34px;
  line-height: 1.2;
}

.modal-coffee {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.modal-tagline {
  margin: 18px 0;
  color: var(--coffee-dark);
  font-size: 17px;
  line-height: 1.7;
}

.modal-copy section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-copy section + section {
  margin-top: 16px;
}

.modal-copy h3 {
  margin: 0 0 7px;
  color: var(--coffee);
  font-size: 13px;
}

.modal-copy section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 34px 24px 52px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
}

.footer span {
  max-width: 760px;
}

.footer a {
  color: var(--coffee);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover {
  color: var(--coffee-dark);
}

.icp-record {
  color: var(--muted);
}

.analytics-shell {
  display: grid;
  gap: 18px;
}

.analytics-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.analytics-empty h3 {
  margin: 0;
  color: var(--coffee-dark);
  font-size: 26px;
}

.analytics-empty p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.admin-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.admin-gate h3 {
  margin: 0;
  color: var(--coffee-dark);
  font-size: 28px;
}

.admin-gate p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.admin-gate small {
  display: block;
  margin-top: 12px;
  color: var(--red);
  font-weight: 800;
}

.admin-login {
  display: grid;
  gap: 10px;
}

.admin-login input,
.date-range input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--coffee-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: #fffdf9;
}

.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.analytics-toolbar div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-toolbar b {
  color: var(--coffee-dark);
}

.analytics-toolbar small {
  color: var(--muted);
  font-weight: 800;
}

.analytics-filters {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.period-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.82);
}

.period-tabs button:hover,
.period-tabs button.active {
  color: #fff;
  border-color: var(--coffee-dark);
  background: var(--coffee-dark);
}

.date-range {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.date-range label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8a98a;
  box-shadow: 0 0 0 4px rgba(200, 169, 138, 0.16);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(77, 139, 113, 0.14);
}

.status-dot.pending {
  background: var(--kraft);
  box-shadow: 0 0 0 4px rgba(200, 149, 109, 0.16);
}

.status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 74, 58, 0.14);
}

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

.metric-grid article {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(88, 61, 37, 0.08);
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-grid b {
  display: block;
  margin-top: 10px;
  color: var(--coffee-dark);
  font-size: 30px;
  line-height: 1;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
}

.analytics-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.analytics-panel.wide {
  grid-column: 1 / -1;
}

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

.panel-head h3 {
  margin: 0;
  color: var(--coffee-dark);
  font-size: 20px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.2fr) 42px 52px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.bar-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--coffee-dark);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row i,
.axis-row i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: #efe1cd;
}

.bar-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--row-color);
}

.bar-row b,
.bar-row small {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.tribe-bars .bar-row {
  grid-template-columns: minmax(96px, 1fr) minmax(160px, 1.5fr) 42px 52px;
}

.axis-list {
  display: grid;
  gap: 18px;
}

.axis-row {
  display: grid;
  gap: 10px;
}

.axis-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.axis-row span {
  color: var(--coffee-dark);
  font-weight: 900;
}

.axis-row b {
  color: var(--muted);
  font-size: 13px;
}

.axis-row em {
  display: block;
  height: 100%;
  border-radius: inherit 0 0 inherit;
  background: linear-gradient(90deg, var(--coffee), var(--kraft));
}

.daily-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 210px;
  padding-top: 18px;
}

.daily-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 8px;
  height: 190px;
}

.daily-bar i {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--kraft), var(--coffee));
}

.daily-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  writing-mode: vertical-rl;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 58px;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mini-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mini-list span {
  min-width: 0;
  overflow: hidden;
  color: var(--coffee-dark);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list b,
.mini-list small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.mini-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.question-list div {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(140px, 0.5fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.question-list.compact div {
  grid-template-columns: 54px 54px minmax(0, 1fr);
}

.question-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.question-list span {
  min-width: 0;
  color: var(--coffee-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.question-list b,
.question-list small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.question-list i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 10px;
  background: #efe1cd;
}

.question-list em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coffee), var(--kraft));
}

@media (max-width: 980px) {
  .topbar {
    padding: 14px 20px;
  }

  .nav a {
    display: none;
  }

  main {
    width: min(100% - 32px, var(--maxw));
    padding-top: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
  }

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

  .hero-gallery {
    max-width: 620px;
  }

  .dimension-strip,
  .persona-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tribe-grid,
  .result-hero,
  .result-grid,
  .modal-layout,
  .analytics-grid,
  .admin-gate {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 12px 16px;
  }

  .nav-action {
    min-height: 44px;
    padding: 0 16px;
  }

  main {
    width: min(100% - 24px, var(--maxw));
    padding-top: 24px;
  }

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

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-copy p,
  .result-copy p {
    font-size: 16px;
  }

  .hero-copy .hero-manifesto {
    font-size: 18px;
  }

  .dimension-strip,
  .option-grid,
  .persona-grid {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 26px;
  }

  .hero-facts div {
    min-height: 68px;
    padding: 12px 10px;
  }

  .hero-facts strong {
    font-size: 24px;
  }

  .hero-facts span {
    margin-top: 6px;
    font-size: 12px;
  }

  .hero-gallery {
    gap: 10px;
    padding: 10px;
  }

  .hero-img-b,
  .hero-img-c {
    transform: none;
  }

  .section-head h2 {
    font-size: 34px;
  }

  .question-card,
  .result-hero,
  .result-block,
  .modal-layout {
    padding: 22px;
  }

  .question-card h2 {
    font-size: 23px;
  }

  .option {
    min-height: 92px;
  }

  .result-copy h1 {
    font-size: 60px;
  }

  .result-copy h2 {
    font-size: 30px;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .analytics-toolbar,
  .panel-head,
  .axis-row div {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-toolbar {
    display: grid;
  }

  .date-range {
    grid-template-columns: 1fr;
  }

  .period-tabs button {
    flex: 1 1 calc(50% - 8px);
    min-width: 132px;
  }

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

  .metric-grid article {
    min-height: 88px;
    padding: 15px;
  }

  .bar-row,
  .tribe-bars .bar-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .bar-row i,
  .bar-row small {
    grid-column: 1 / -1;
  }

  .bar-row b {
    grid-column: 2;
    grid-row: 1;
  }

  .question-list div,
  .question-list.compact div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .question-list i,
  .question-list small {
    grid-column: 1 / -1;
  }

  .question-list b {
    grid-column: 2;
    grid-row: 1;
  }

  .daily-chart {
    gap: 5px;
  }

  .daily-bar span {
    font-size: 10px;
  }
}

/* Mature image-led demo polish */
:root {
  --bg: #efede7;
  --surface: #f7f4ed;
  --surface-warm: #eee6da;
  --paper: #ded4c6;
  --ink: #191714;
  --muted: #625b52;
  --soft: #91877b;
  --line: #d0c4b4;
  --line-strong: #a99b89;
  --kraft: #946745;
  --coffee: #4a3429;
  --coffee-dark: #1e1915;
  --red: #a33d34;
  --yellow: #a7792c;
  --blue: #2d6075;
  --green: #4d7057;
  --shadow: 0 22px 46px rgba(29, 23, 18, 0.13);
  --shadow-soft: 0 12px 28px rgba(29, 23, 18, 0.09);
}

html,
body {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(163, 61, 52, 0.08), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(45, 96, 117, 0.10), transparent 30%),
    linear-gradient(135deg, rgba(25, 23, 20, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #f2f0ea 0%, #e9e4dc 46%, #f1eee8 100%);
  background-size: auto, auto, 18px 18px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 12px 18px, rgba(25, 23, 20, 0.065) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42px 36px, rgba(255, 255, 255, 0.40) 0 1px, transparent 1.5px);
  background-size: 64px 64px;
  mix-blend-mode: multiply;
  opacity: 0.42;
}

.topbar {
  padding: 16px 40px;
  background: rgba(239, 237, 231, 0.88);
  border-bottom-color: rgba(47, 39, 31, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.60) inset;
}

.brand-logo {
  width: 78px;
}

.nav {
  color: #4d463e;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
}

.nav-action,
.btn-primary {
  background: #1d1814;
  box-shadow: 0 12px 24px rgba(29, 24, 20, 0.18);
}

.btn {
  border-radius: 6px;
  letter-spacing: 0;
}

.btn-secondary {
  background: rgba(247, 244, 237, 0.72);
  border-color: rgba(73, 57, 43, 0.28);
}

main {
  padding-top: 48px;
}

.hero {
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  align-items: start;
  gap: 64px;
}

.hero-copy h1 {
  max-width: 660px;
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  font-size: 66px;
  font-weight: 800;
  line-height: 1.06;
}

.hero-copy p {
  color: var(--muted);
}

.hero-copy .hero-manifesto {
  position: relative;
  max-width: 610px;
  padding-left: 18px;
  color: #342b24;
  font-size: 21px;
  font-weight: 650;
}

.hero-copy .hero-manifesto::before {
  position: absolute;
  top: 0.35em;
  bottom: 0.35em;
  left: 0;
  width: 3px;
  content: "";
  background: linear-gradient(180deg, var(--red), var(--blue), var(--green));
}

.hero-manifesto strong {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.hero-facts div,
.dimension,
.question-card,
.analytics-empty,
.admin-gate,
.analytics-toolbar,
.analytics-filters,
.result-block {
  background: rgba(247, 244, 237, 0.82);
  border-color: rgba(73, 57, 43, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) inset;
}

.hero-facts strong,
.section-head h2,
.dimension h3,
.persona-title h3,
.result-copy h1,
.result-copy h2,
.modal-copy h2 {
  color: var(--ink);
}

.hero-gallery {
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-gallery::before {
  display: none;
}

.hero-img {
  aspect-ratio: 9 / 16;
  border-color: rgba(53, 43, 34, 0.24);
  background:
    linear-gradient(180deg, rgba(247, 244, 237, 0.72), rgba(215, 205, 190, 0.72)),
    #ddd2c3;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 18px 34px rgba(26, 20, 16, 0.16);
  filter: saturate(0.94) contrast(1.02);
}

.hero-img-b,
.hero-img-c {
  transform: none;
}

.hero-img-b,
.hero-img-d {
  margin-top: 28px;
}

.dimension span,
.question-axis,
.chip,
.period-tabs button,
.keyword-row b,
.member-row span,
.result-coffee {
  border-radius: 4px;
  background: rgba(239, 232, 221, 0.78);
}

.section-head {
  max-width: 760px;
  text-align: left;
}

.section-head p {
  color: var(--coffee);
  font-size: 11px;
}

.section-head h2 {
  font-family: ui-serif, Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  font-weight: 760;
}

.section-head span {
  color: var(--muted);
}

.tribe-card {
  border-top: 0;
  border-left: 5px solid var(--tribe);
  background: linear-gradient(180deg, rgba(247, 244, 237, 0.94), rgba(232, 226, 216, 0.86));
  box-shadow: var(--shadow-soft);
}

.tribe-top span {
  border-radius: 4px;
}

.persona-grid {
  gap: 18px;
}

.persona-click {
  border-color: rgba(73, 57, 43, 0.18);
  background: rgba(247, 244, 237, 0.88);
  box-shadow: 0 12px 28px rgba(29, 23, 18, 0.08);
}

.persona-click:hover {
  border-color: color-mix(in srgb, var(--tribe) 72%, #1e1915 28%);
  box-shadow: 0 18px 34px rgba(29, 23, 18, 0.13);
}

.persona-image,
.result-art,
.modal-art {
  background:
    linear-gradient(180deg, rgba(247, 244, 237, 0.70), rgba(215, 205, 190, 0.76)),
    #ddd2c3;
}

.persona-image {
  aspect-ratio: 9 / 16;
}

.persona-image img {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.96) contrast(1.02);
}

.result-art img,
.modal-art img {
  object-fit: contain;
  object-position: center;
  filter: saturate(0.96) contrast(1.02);
}

.persona-image span {
  top: 12px;
  left: 12px;
  border: 1px solid rgba(247, 244, 237, 0.34);
  border-radius: 4px;
  background: rgba(25, 23, 20, 0.74);
  backdrop-filter: blur(8px);
}

.persona-info {
  padding: 15px 15px 17px;
}

.persona-title small {
  color: color-mix(in srgb, var(--tribe) 86%, #1e1915 14%);
}

.persona-info p,
.persona-info b {
  color: var(--muted);
}

.result-hero {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  border-top: 0;
  border-left: 6px solid var(--tribe);
  background: linear-gradient(180deg, rgba(247, 244, 237, 0.96), rgba(232, 226, 216, 0.90));
}

.result-art img,
.modal-art img {
  aspect-ratio: 9 / 16;
}

.result-block h3,
.modal-copy h3 {
  color: #3c3028;
}

.result-block li::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  content: "";
  background: var(--coffee);
  border-radius: 50%;
  transform: translateY(-1px);
}

.modal-mask {
  background: rgba(25, 23, 20, 0.48);
}

.modal-panel {
  background: var(--surface);
  border-color: rgba(73, 57, 43, 0.22);
}

.modal-layout {
  background: linear-gradient(180deg, rgba(247, 244, 237, 0.98), rgba(232, 226, 216, 0.92));
}

@media (max-width: 980px) {
  .hero {
    gap: 36px;
  }

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

  .hero-gallery {
    max-width: 680px;
  }

  .section-head {
    text-align: center;
  }
}

@media (max-width: 620px) {
  .topbar {
    background: rgba(239, 237, 231, 0.94);
  }

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

  .hero-copy .hero-manifesto {
    font-size: 18px;
  }

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

  .hero-img-b,
  .hero-img-d {
    margin-top: 14px;
  }

  .result-hero,
  .question-card,
  .result-block,
  .modal-layout {
    padding: 20px;
  }

  .persona-image {
    aspect-ratio: 9 / 16;
  }
}

/* Emergency responsive repair for mature portrait assets. */
.hero-copy,
.hero-gallery {
  min-width: 0;
}

.hero-img {
  height: auto;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-gallery {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-copy h1 {
    width: 100%;
    max-width: 100%;
  }

  .hero-gallery {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-img {
    width: 100%;
    max-height: 310px;
  }
}

/* Emergency responsive repair for result and modal portrait layouts. */
.result-copy,
.modal-copy,
.result-art,
.modal-art {
  min-width: 0;
}

.result-copy,
.modal-copy {
  width: 100%;
  max-width: 100%;
}

.result-copy h1,
.result-copy h2,
.result-copy p,
.modal-copy h2,
.modal-copy p {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.result-art,
.modal-art {
  max-width: 100%;
}

.result-art img,
.modal-art img {
  height: auto;
  max-width: 100%;
}

@media (max-width: 980px) {
  .result-hero,
  .modal-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .result-art {
    width: min(100%, 480px);
    justify-self: center;
  }

  .modal-art {
    width: min(100%, 360px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .result-art {
    width: min(100%, 340px);
  }

  .modal-art {
    width: min(100%, 300px);
  }

  .result-art img,
  .modal-art img {
    max-height: 58vh;
  }
}

/* P0 fix: prevent result/share layouts from squeezing text vertically on narrow screens. */
.result-copy,
.result-art,
.modal-copy,
.modal-art {
  min-width: 0;
}

@media (max-width: 980px) {
  .result-hero,
  .modal-layout {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .result-copy {
    width: 100%;
    max-width: 100%;
  }

  .result-copy h1,
  .result-copy h2,
  .result-copy p,
  .result-coffee {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 620px) {
  .result-art img,
  .modal-art img {
    max-height: 520px;
    width: 100%;
    height: auto;
  }

  .share-card {
    width: min(100%, 360px);
    height: min(700px, calc(100svh - 132px));
    min-height: 500px;
    padding: 16px;
  }

  .share-card-copy h1 {
    font-size: 38px;
  }

  .share-card-copy h2 {
    font-size: 22px;
  }

  .share-actions {
    width: 100%;
  }

  .share-actions .btn {
    flex: 1 1 150px;
  }

  .result-share-strip {
    padding-top: 18px;
  }

  .result-share-strip .btn {
    width: 100%;
  }
}

.persona-image,
.result-art,
.modal-art,
.share-card-art {
  position: relative;
}

.persona-image::before,
.result-art::before,
.modal-art::before,
.share-card-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(110deg, rgba(255, 252, 246, 0) 0%, rgba(255, 252, 246, 0.58) 42%, rgba(255, 252, 246, 0) 70%),
    linear-gradient(180deg, rgba(247, 244, 237, 0.88), rgba(215, 205, 190, 0.86));
  background-size: 220% 100%, auto;
  animation: imagePlaceholderSweep 1.4s ease-in-out infinite;
}

.persona-image img,
.result-art img,
.modal-art img,
.share-card-art img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 180ms ease, transform 300ms ease;
}

.persona-image img.is-loaded,
.result-art img.is-loaded,
.modal-art img.is-loaded,
.share-card-art img.is-loaded {
  opacity: 1;
}

@keyframes imagePlaceholderSweep {
  from {
    background-position: 120% 0, 0 0;
  }
  to {
    background-position: -120% 0, 0 0;
  }
}

/* Final mobile presets for share/result image reliability. */
.share-page {
  align-items: start;
}

.share-card {
  max-height: none;
}

.share-card-art {
  flex: 0 0 auto;
  height: clamp(250px, 42svh, 360px);
}

.share-actions {
  align-items: stretch;
}

@media (max-width: 460px) {
  main {
    width: min(100% - 20px, var(--maxw));
  }

  .share-page {
    padding-bottom: 12px;
  }

  .share-card {
    width: min(100%, 390px);
    height: auto;
    min-height: 0;
    padding: 16px;
  }

  .share-card-top img {
    width: 66px;
  }

  .share-card-art {
    height: clamp(238px, 40svh, 330px);
    margin-top: 12px;
    padding: 7px;
  }

  .share-card-copy {
    padding-top: 12px;
  }

  .share-card-copy h1 {
    font-size: 36px;
  }

  .share-card-copy h2 {
    font-size: 21px;
  }

  .share-card-copy p,
  .share-card-copy b {
    font-size: 12px;
    line-height: 1.45;
  }

  .share-card-footer {
    margin-top: 10px;
    padding-top: 9px;
  }

  .share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .share-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 370px) {
  main {
    width: min(100% - 16px, var(--maxw));
  }

  .share-card {
    padding: 14px;
  }

  .share-card-art {
    height: clamp(210px, 36svh, 285px);
  }

  .share-card-copy h1 {
    font-size: 32px;
  }

  .share-card-copy h2 {
    font-size: 19px;
  }

  .share-card-copy p,
  .share-card-copy b,
  .share-card-footer span {
    font-size: 11px;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }
}
