/* Horror Survival Index — quiz UI */
body[data-hsi-page="1"] .hsi-hero-art {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0;
}
body[data-hsi-page="1"] .hsi-hero-art svg {
  width: min(100%, 440px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(40, 8, 12, .18);
}
body[data-hsi-page="1"] .hsi-shell {
  margin: 0 0 1.5rem;
  min-width: 0;
}
body[data-hsi-page="1"] .hsi-shell > *,
body[data-hsi-page="1"] .eco-calc-form {
  min-width: 0;
  max-width: 100%;
}
body[data-hsi-page="1"] .eco-calc-form {
  overflow: hidden;
}
/* How-to stays stacked: 3-col inside half-width form bleeds into results */
body[data-hsi-page="1"] .hsi-howto {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #c41e3a 28%, var(--border, #ddd));
  background: color-mix(in srgb, #c41e3a 6%, var(--bg-card, #fff));
  min-width: 0;
  max-width: 100%;
}
body[data-hsi-page="1"] .hsi-howto-step {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  min-width: 0;
}
body[data-hsi-page="1"] .hsi-howto-num {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .82rem;
  background: #c41e3a;
  color: #fff;
}
body[data-hsi-page="1"] .hsi-howto-body { min-width: 0; }
body[data-hsi-page="1"] .hsi-howto-title {
  display: block;
  font-weight: 700;
  font-size: .88rem;
  line-height: 1.25;
  margin-bottom: .1rem;
}
body[data-hsi-page="1"] .hsi-howto-desc {
  display: block;
  font-size: .78rem;
  line-height: 1.35;
  color: var(--text-muted, #666);
}
body[data-hsi-page="1"] .hsi-challenge-banner {
  border: 2px solid #c41e3a;
  background: color-mix(in srgb, #c41e3a 12%, var(--bg-card, #fff));
  color: var(--text, #1a1a1a);
  border-radius: 12px;
  padding: .85rem 1rem;
  margin: 0 0 1rem;
  font-weight: 600;
  line-height: 1.45;
}
body[data-hsi-page="1"] .hsi-panel {
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 14px;
  background: var(--bg-card, #fff);
  padding: 1.1rem 1.15rem 1.25rem;
}
body[data-hsi-page="1"] .hsi-name-label {
  display: block;
  font-weight: 600;
  margin-bottom: .45rem;
}
body[data-hsi-page="1"] .hsi-photo-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin: 0 0 1rem;
}
body[data-hsi-page="1"] .hsi-photo-preview,
body[data-hsi-page="1"] .hsi-timeline-you-photo,
body[data-hsi-page="1"] .hsi-cert-mini-photo {
  object-fit: cover;
  border-radius: 50%;
  background: #1a0a0a;
}
body[data-hsi-page="1"] .hsi-photo-preview {
  width: 160px;
  height: 160px;
  flex: 0 0 auto;
  border: 3px dashed #c41e3a;
  box-shadow: 0 6px 16px rgba(40, 8, 10, 0.2);
}
body[data-hsi-page="1"] .hsi-photo-empty {
  display: block;
}
body[data-hsi-page="1"] .hsi-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
body[data-hsi-page="1"] .hsi-photo-actions .calc-hint {
  flex: 1 0 100%;
  margin: 0;
}
body[data-hsi-page="1"] .hsi-photo-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
body[data-hsi-page="1"] .hsi-photo-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
body[data-hsi-page="1"] .hsi-timeline-you-photo {
  width: 52px;
  height: 52px;
  border: 3px solid #ff6b6b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c41e3a 25%, transparent);
}
body[data-hsi-page="1"] .hsi-timeline-you.has-photo.is-survive .hsi-timeline-you-photo {
  border-color: #7CFC9A;
}
body[data-hsi-page="1"] .hsi-cert-mini-photo {
  width: 128px;
  height: 128px;
  border: 3px solid #f2ebe1;
  margin: 0 auto .45rem;
  display: block;
  box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.45);
}
body[data-hsi-page="1"] .hsi-name-input {
  width: 100%;
  max-width: 28rem;
  padding: .65rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--border, #ccc);
  background: var(--bg, #fff);
  color: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}
body[data-hsi-page="1"] .hsi-start { margin-top: .85rem; }
body[data-hsi-page="1"] .hsi-set-label {
  font-weight: 600;
  margin: 0 0 .45rem;
  font-size: .95rem;
}
body[data-hsi-page="1"] .hsi-set-chips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .45rem;
  margin-bottom: .25rem;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 560px) {
  body[data-hsi-page="1"] .hsi-set-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body[data-hsi-page="1"] .hsi-set-chip {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: .65rem .7rem;
  border-radius: 10px;
  border: 2px solid var(--border, #ddd);
  background: var(--bg-card, #fff);
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
body[data-hsi-page="1"] .hsi-set-chip:hover {
  border-color: color-mix(in srgb, #c41e3a 50%, var(--border, #ddd));
}
body[data-hsi-page="1"] .hsi-set-chip.is-active {
  border-color: #c41e3a;
  background: color-mix(in srgb, #c41e3a 9%, var(--bg-card, #fff));
}
body[data-hsi-page="1"] .hsi-set-title { font-weight: 700; font-size: .9rem; line-height: 1.25; }
body[data-hsi-page="1"] .hsi-set-note { font-size: .75rem; color: var(--text-muted, #666); line-height: 1.3; }
body[data-hsi-page="1"] .hsi-setting-tag {
  margin: 0 0 .85rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted, #666);
}
body[data-hsi-page="1"] .hsi-timeline {
  margin: 0 0 1.15rem;
  padding: .85rem .9rem .7rem;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e5e5);
  background: color-mix(in srgb, var(--bg, #fafafa) 75%, transparent);
}
body[data-hsi-page="1"] .hsi-timeline-title {
  margin: 0 0 .65rem;
  font-weight: 700;
  font-size: .92rem;
}
body[data-hsi-page="1"] .hsi-timeline-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border, #ddd) 85%, transparent);
  margin: 1.7rem 0 .55rem;
  overflow: visible;
}
body[data-hsi-page="1"] .hsi-timeline-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5c101c, #c41e3a);
  max-width: 100%;
}
body[data-hsi-page="1"] .hsi-timeline-fg {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: #2d6a4f;
  transform: translateX(-50%);
  z-index: 2;
}
body[data-hsi-page="1"] .hsi-timeline-fg-label {
  position: absolute;
  top: -1.35rem;
  right: 0;
  transform: translateX(0);
  white-space: nowrap;
  font-size: .68rem;
  font-weight: 700;
  color: #2d6a4f;
  letter-spacing: .02em;
}
body[data-hsi-page="1"] .hsi-timeline-you {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body[data-hsi-page="1"] .hsi-timeline-you-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1a0a0a;
  border: 3px solid #ff6b6b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c41e3a 25%, transparent);
}
body[data-hsi-page="1"] .hsi-timeline-you.is-survive .hsi-timeline-you-dot {
  border-color: #7CFC9A;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2d6a4f 25%, transparent);
}
body[data-hsi-page="1"] .hsi-timeline-you-label {
  position: absolute;
  top: 1.15rem;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text, #222);
  background: var(--bg-card, #fff);
  padding: .15rem .4rem;
  border-radius: 6px;
  border: 1px solid var(--border, #ddd);
}
body[data-hsi-page="1"] .hsi-timeline-scale {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-muted, #666);
  font-variant-numeric: tabular-nums;
  margin-top: 1.55rem;
}
body[data-hsi-page="1"] .hsi-press-kit {
  border: 1px solid color-mix(in srgb, #c41e3a 35%, var(--border, #ddd));
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
  background: color-mix(in srgb, #c41e3a 5%, var(--bg-card, #fff));
  margin: 1.25rem 0;
}
body[data-hsi-page="1"] .hsi-press-kit-kicker {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  font-weight: 800;
  color: #c41e3a;
  margin: 0 0 .35rem;
}
body[data-hsi-page="1"] .hsi-press-kit-intro {
  margin: 0 0 .85rem;
  line-height: 1.5;
  font-size: .95rem;
}
body[data-hsi-page="1"] .hsi-press-quotes {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
body[data-hsi-page="1"] .hsi-press-quotes li {
  margin: 0;
  padding: .75rem .85rem;
  border-radius: 10px;
  border-left: 3px solid #c41e3a;
  background: var(--bg-card, #fff);
  line-height: 1.5;
  font-size: .92rem;
}
body[data-hsi-page="1"] .hsi-press-quotes cite {
  display: block;
  margin-top: .35rem;
  font-style: normal;
  font-size: .78rem;
  color: var(--text-muted, #666);
}
body[data-hsi-page="1"] .hsi-progress { margin-bottom: 1rem; }
body[data-hsi-page="1"] .hsi-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--text-muted, #666);
  margin-bottom: .4rem;
}
body[data-hsi-page="1"] .hsi-trait { font-weight: 600; color: var(--text, #222); }
body[data-hsi-page="1"] .hsi-progress-track,
body[data-hsi-page="1"] .hsi-bar-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border, #ddd) 80%, transparent);
  overflow: hidden;
}
body[data-hsi-page="1"] .hsi-progress-fill,
body[data-hsi-page="1"] .hsi-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b1a2b, #c41e3a);
  transition: width .25s ease;
}
body[data-hsi-page="1"] .hsi-cat {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c41e3a;
  font-weight: 700;
  margin: 0 0 .5rem;
}
body[data-hsi-page="1"] .hsi-q {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.35;
  margin: 0 0 1rem;
}
body[data-hsi-page="1"] .hsi-opts {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}
@media (min-width: 720px) {
  body[data-hsi-page="1"] .hsi-opts {
    grid-template-columns: 1fr 1fr;
  }
}
body[data-hsi-page="1"] .hsi-opt {
  display: flex;
  gap: .75rem;
  text-align: left;
  align-items: flex-start;
  padding: .85rem .9rem;
  border-radius: 12px;
  border: 2px solid var(--border, #ddd);
  background: var(--bg-card, #fff);
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
body[data-hsi-page="1"] .hsi-opt:hover {
  border-color: color-mix(in srgb, #c41e3a 55%, var(--border, #ddd));
}
body[data-hsi-page="1"] .hsi-opt.is-active {
  border-color: #c41e3a;
  background: color-mix(in srgb, #c41e3a 10%, var(--bg-card, #fff));
  transform: translateY(-1px);
}
body[data-hsi-page="1"] .hsi-opt-letter {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: #c41e3a;
  color: #fff;
  font-size: .9rem;
}
body[data-hsi-page="1"] .hsi-opt-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
body[data-hsi-page="1"] .hsi-opt-text { font-weight: 600; line-height: 1.4; }
body[data-hsi-page="1"] .hsi-opt-note { font-size: .82rem; color: var(--text-muted, #666); line-height: 1.35; }
body[data-hsi-page="1"] .hsi-hint { font-size: .85rem; color: var(--text-muted, #666); margin: .85rem 0 .5rem; }
body[data-hsi-page="1"] .hsi-result-kicker {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  font-weight: 700;
  color: #c41e3a;
  margin: 0 0 .35rem;
}
body[data-hsi-page="1"] .hsi-death {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 .35rem;
  font-variant-numeric: tabular-nums;
}
body[data-hsi-page="1"] .hsi-act {
  color: var(--text-muted, #666);
  margin: 0 0 1rem;
  font-weight: 600;
}
body[data-hsi-page="1"] .hsi-arch-card {
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--bg, #fafafa) 70%, transparent);
}
body[data-hsi-page="1"] .hsi-arch-title {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}
body[data-hsi-page="1"] .hsi-rate { margin: 0 0 .35rem; font-weight: 600; }
body[data-hsi-page="1"] .hsi-rate-track { margin-bottom: .75rem; }
body[data-hsi-page="1"] .hsi-diagnosis { margin: 0; line-height: 1.55; }
body[data-hsi-page="1"] .hsi-blow { margin: .75rem 0 0; font-weight: 600; line-height: 1.45; }
body[data-hsi-page="1"] .hsi-bars { display: grid; gap: .7rem; margin: 0 0 1rem; }
body[data-hsi-page="1"] .hsi-bar-label {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .9rem;
  margin-bottom: .25rem;
}
body[data-hsi-page="1"] .hsi-pop {
  font-weight: 600;
  margin: 0 0 1.1rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  background: color-mix(in srgb, #c41e3a 8%, var(--bg-card, #fff));
}
body[data-hsi-page="1"] .hsi-viral {
  display: grid;
  gap: .65rem;
}
body[data-hsi-page="1"] .hsi-cert-preview {
  display: flex;
  justify-content: center;
  margin-bottom: .25rem;
}
body[data-hsi-page="1"] .hsi-cert-mini {
  width: 240px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  border: 2px solid #c41e3a;
  background: linear-gradient(180deg, #2c0f12, #0a0608);
  color: #f5e6e0;
  padding: .85rem .65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  text-align: center;
  font-size: .75rem;
}
body[data-hsi-page="1"] .hsi-cert-mini.has-photo {
  justify-content: flex-start;
  padding-top: 1rem;
  gap: .25rem;
}
body[data-hsi-page="1"] .hsi-cert-mini strong { font-size: .92rem; line-height: 1.2; }
body[data-hsi-page="1"] .hsi-cert-mini em { font-style: normal; opacity: .85; line-height: 1.25; }
body[data-hsi-page="1"] .hsi-lead {
  border: 1px dashed color-mix(in srgb, #c41e3a 50%, var(--border, #ddd));
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-top: .25rem;
}
body[data-hsi-page="1"] .hsi-lead-title { margin: 0 0 .35rem; font-weight: 700; }
body[data-hsi-page="1"] .hsi-lead-body { margin: 0 0 .65rem; line-height: 1.45; font-size: .95rem; }
body[data-hsi-page="1"] .hsi-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  max-width: min(92vw, 28rem);
  padding: .75rem 1rem;
  border-radius: 999px;
  background: #1a0a0a;
  color: #f5e6e0;
  border: 1px solid #c41e3a;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
  text-align: center;
  font-size: .92rem;
}
body[data-hsi-page="1"] .hsi-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body[data-hsi-page="1"] .hsi-formula-box {
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--bg, #f7f7f7) 85%, transparent);
  margin: 1rem 0;
  overflow-x: auto;
}
body[data-hsi-page="1"] .hsi-formula-box code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .95rem;
  white-space: nowrap;
}
body[data-hsi-page="1"] .hsi-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 1rem 0 1.25rem;
}
body[data-hsi-page="1"] .hsi-stat-table th,
body[data-hsi-page="1"] .hsi-stat-table td {
  border: 1px solid var(--border, #ddd);
  padding: .55rem .65rem;
  text-align: left;
  vertical-align: top;
}
body[data-hsi-page="1"] .hsi-stat-table th {
  background: color-mix(in srgb, #c41e3a 10%, var(--bg-card, #fff));
  font-weight: 700;
}
body[data-hsi-page="1"] .hsi-scroll-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Viral 1-tap vibe grid */
body[data-hsi-page="1"] .hsi-vibe-lead {
  margin: 0 0 .85rem;
  font-size: .95rem;
  line-height: 1.45;
  font-weight: 600;
}
body[data-hsi-page="1"] .hsi-viral-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  margin: 0 0 1.1rem;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 420px) {
  body[data-hsi-page="1"] .hsi-viral-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body[data-hsi-page="1"] .hsi-viral-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 4.5rem;
  padding: .85rem .9rem;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, #c41e3a 45%, #1a0a0a);
  background: linear-gradient(160deg, #2c0f12 0%, #1a0a0a 100%);
  color: #f5e6e0;
  cursor: pointer;
  font: inherit;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
body[data-hsi-page="1"] .hsi-viral-card:hover,
body[data-hsi-page="1"] .hsi-viral-card:focus-visible {
  transform: translateY(-1px);
  border-color: #ff4d6d;
  box-shadow: 0 8px 20px rgba(196, 30, 58, .28);
  outline: none;
}
body[data-hsi-page="1"] .hsi-viral-card.is-active {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #c41e3a 55%, transparent);
  background: linear-gradient(160deg, #4a1418 0%, #2c0f12 100%);
}
body[data-hsi-page="1"] .hsi-viral-card-title {
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.25;
}
body[data-hsi-page="1"] .hsi-viral-card-note {
  font-size: .78rem;
  line-height: 1.3;
  color: #c9b8b0;
}
body[data-hsi-page="1"] .hsi-start {
  width: 100%;
  margin-top: .35rem;
}
