:root {
  --bg: #d9edff;
  --paper: #f6faff;
  --surface: #ffffff;
  --surface-2: #f1f7ff;
  --ink: #1d2a3d;
  --muted: #697c96;
  --soft: #8da0b8;
  --line: #dbe9fb;
  --line-strong: #bdd5f2;
  --blue: #327af2;
  --blue-deep: #2269df;
  --blue-soft: #eaf4ff;
  --cyan: #80c4ff;
  --pink: #ff6e9f;
  --pink-soft: #fff0f6;
  --teal: #16a08f;
  --teal-soft: #e8fbf8;
  --violet: #7567ff;
  --violet-soft: #f0efff;
  --shadow: 0 24px 60px rgba(35, 87, 158, 0.2);
  --shadow-soft: 0 12px 28px rgba(35, 87, 158, 0.1);
  --radius: 16px;
  --radius-lg: 24px;
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(180deg, #edf8ff 0%, #d8edff 42%, #8dc4ff 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.icon-sprite {
  display: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  border-inline: 1px solid rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 46%, #f8fbff 100%),
    var(--paper);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid rgba(219, 233, 251, 0.88);
  background: rgba(248, 251, 255, 0.9);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-button,
.icon-button,
.tab-button,
.primary-button,
.secondary-button,
.answer-option,
.legal-link {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(50, 122, 242, 0.18);
}

.brand-button strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.brand-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-deep);
  box-shadow: 0 8px 18px rgba(35, 87, 158, 0.08);
}

.icon-button svg,
.tab-button svg,
.primary-button svg,
.secondary-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-main {
  min-height: 0;
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom));
}

.screen {
  display: grid;
  gap: 16px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.18;
  font-weight: 900;
}

h2 {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 900;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 850;
}

.lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  margin: 0 0 10px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.hero-panel,
.panel,
.result-hero,
.question-card,
.report-card,
.version-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.home-hero,
.result-hero,
.hero-band {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #236ee8 0%, #4d96ff 56%, #86c4ff 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(50, 122, 242, 0.28);
}

.home-hero {
  min-height: 276px;
  padding: 24px 20px 22px;
  display: grid;
  align-content: end;
  gap: 20px;
}

.home-hero::after,
.result-hero::after,
.hero-band::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 98px;
  height: 98px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  transform: rotate(12deg);
  pointer-events: none;
}

.home-hero > *,
.result-hero > *,
.hero-band > * {
  position: relative;
  z-index: 1;
}

.home-hero h1 {
  max-width: 10em;
  font-size: 33px;
}

.home-hero .lede,
.result-hero .lede,
.hero-band .lede {
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: grid;
  gap: 10px;
}

.section-head {
  min-height: 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.version-grid,
.feature-grid,
.report-grid,
.form-grid {
  display: grid;
  gap: 12px;
}

.version-card {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.version-card::before {
  content: none;
}

.version-card h3 {
  margin-top: 8px;
  font-size: 20px;
}

.version-card p,
.feature-card p,
.panel p,
.report-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

.version-card p {
  max-width: 25em;
}

.version-card .primary-button,
.version-card .secondary-button {
  min-width: 104px;
}

.result-strip {
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(50, 122, 242, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.result-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
}

.hero-band {
  min-height: 128px;
  padding: 16px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
}

.hero-band img {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 24px rgba(35, 87, 158, 0.16);
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeaf7;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  transition: width 0.22s ease;
}

.question-card {
  padding: 15px;
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

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

.question-index {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(50, 122, 242, 0.2);
}

.axis-chip,
.mini-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cfe1f8;
  color: var(--blue-deep);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.question-text {
  min-height: 76px;
  padding: 4px 0;
  font-size: 21px;
  line-height: 1.5;
  font-weight: 850;
}

.options-grid {
  display: grid;
  gap: 10px;
}

.answer-option {
  min-height: 58px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.answer-option:hover,
.answer-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(50, 122, 242, 0.42);
  box-shadow: 0 10px 20px rgba(50, 122, 242, 0.1);
}

.answer-option.is-selected {
  border-color: rgba(50, 122, 242, 0.5);
  background: linear-gradient(180deg, #f6faff 0%, #edf5ff 100%);
  box-shadow: 0 10px 20px rgba(50, 122, 242, 0.12);
}

.answer-dot {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 14px;
  background: #edf4ff;
  border: 0;
}

.answer-dot::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0;
}

.answer-option.is-selected .answer-dot {
  background: var(--blue);
}

.answer-option.is-selected .answer-dot::after {
  background: #ffffff;
  opacity: 1;
}

.answer-label {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 780;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 10px 20px rgba(50, 122, 242, 0.24);
}

.secondary-button {
  color: var(--blue-deep);
  border: 1px solid #c8dcf6;
  background: rgba(255, 255, 255, 0.82);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.tab-button:focus-visible,
.answer-option:focus-visible {
  outline: 3px solid rgba(50, 122, 242, 0.18);
  outline-offset: 2px;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.report-actions {
  position: sticky;
  top: 8px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(219, 233, 251, 0.92);
  border-radius: var(--radius);
  background: rgba(248, 251, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.report-actions .primary-button,
.report-actions .secondary-button {
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
}

.report-toc {
  gap: 10px;
}

.toc-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.toc-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(50, 122, 242, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 850;
  scroll-snap-align: start;
}

.report-section {
  scroll-margin-top: 96px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 520px);
  transform: translateX(-50%);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(219, 233, 251, 0.92);
  background: rgba(248, 251, 255, 0.94);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab-button {
  min-height: 52px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 800;
}

.tab-button svg {
  width: 19px;
  height: 19px;
}

.tab-button.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.result-hero {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.result-hero h1 {
  font-size: 27px;
}

.type-lockup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.type-code {
  min-width: 82px;
  min-height: 54px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(50, 122, 242, 0.12);
  background: #ffffff;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.result-hero .tag {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.tag.is-good {
  color: #137c72;
  background: var(--teal-soft);
}

.tag.is-risk {
  color: #c34268;
  background: var(--pink-soft);
}

.tag.is-advice {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.report-card,
.panel {
  padding: 16px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.report-card h2,
.panel h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.report-card h2::before,
.panel h2::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background:
    linear-gradient(#ffffff 0 0) 50% 10px / 14px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 50% 16px / 18px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 50% 22px / 10px 3px no-repeat,
    linear-gradient(135deg, var(--blue), #7ebdff);
  flex: 0 0 auto;
  opacity: 0.9;
}

.report-card h2::after,
.panel h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.report-digest {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-overview-card {
  gap: 14px;
}

.overview-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(50, 122, 242, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7fbff 0%, #edf6ff 100%);
}

.overview-hero span,
.formula-card span,
.chart-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.overview-hero strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.overview-hero p,
.formula-card p {
  margin-top: 6px;
  color: var(--muted);
}

.overview-score {
  width: 92px;
  min-height: 92px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #d6e7fb;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 10px 20px rgba(50, 122, 242, 0.1);
}

.overview-score strong {
  margin: 0;
  color: var(--blue-deep);
  font-size: 24px;
}

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

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

.chart-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chart-title strong {
  font-size: 15px;
}

.radar-chart {
  display: grid;
  place-items: center;
  min-height: 190px;
}

.radar-chart svg {
  width: min(100%, 220px);
  height: auto;
}

.radar-grid {
  fill: none;
  stroke: #cbdcf2;
  stroke-width: 1.4;
}

.radar-grid.is-mid,
.radar-grid.is-low,
.radar-axis {
  stroke: #e1ecfa;
}

.radar-area {
  fill: rgba(50, 122, 242, 0.18);
  stroke: var(--blue);
  stroke-width: 3;
}

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

.chart-list span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-list strong {
  color: var(--blue-deep);
}

.chart-list.is-two {
  grid-template-columns: repeat(2, 1fr);
}

.attachment-map {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 190px;
  border: 1px solid #d8e6f8;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #c8d8ee calc(50% - 1px), #c8d8ee calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), #c8d8ee calc(50% - 1px), #c8d8ee calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.attachment-map i {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--pink);
  box-shadow: 0 0 0 8px rgba(255, 110, 159, 0.14), 0 0 0 18px rgba(255, 110, 159, 0.08);
  transform: translate(-50%, -50%);
}

.map-label {
  position: absolute;
  color: #61738e;
  font-size: 12px;
  font-weight: 850;
}

.map-label.top-left {
  left: 14px;
  top: 14px;
}

.map-label.top-right {
  right: 14px;
  top: 14px;
}

.map-label.bottom-left {
  left: 14px;
  bottom: 14px;
}

.map-label.bottom-right {
  right: 14px;
  bottom: 14px;
}

.formula-card {
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4f9ff 0%, #ffffff 100%);
  border: 1px solid rgba(50, 122, 242, 0.18);
}

.formula-card strong {
  display: block;
  margin-top: 5px;
  color: var(--blue-deep);
  font-size: 18px;
  line-height: 1.35;
}

.digest-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.digest-card strong {
  color: var(--ink);
  font-size: 18px;
}

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

.manual-grid h3 {
  font-size: 15px;
}

.score-breakdown {
  display: grid;
  gap: 10px;
}

.score-line {
  min-height: 52px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  grid-template-columns: 88px 74px 1fr;
  gap: 10px;
  align-items: start;
}

.score-line:first-child {
  border-top: 0;
  padding-top: 0;
}

.score-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-line strong {
  color: var(--blue-deep);
  font-size: 14px;
}

.score-line p {
  margin: 0;
}

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

.insight-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f7fbff;
}

.insight-row > span {
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 850;
}

.insight-row strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.insight-row p {
  margin: 5px 0 0;
}

.step-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: #f7fbff;
}

.step-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.step-list p {
  margin: 1px 0 0;
}

.code-card {
  border-color: rgba(50, 122, 242, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}

.code-line {
  min-height: 54px;
  padding: 10px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #cfe1f8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.code-line strong {
  overflow-wrap: anywhere;
  color: var(--blue-deep);
  font-size: 18px;
  letter-spacing: 0;
}

.notice-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(50, 122, 242, 0.22);
  border-radius: var(--radius);
  background: #f5f9ff;
}

.notice-box.is-compact {
  gap: 5px;
}

.notice-box strong {
  color: var(--blue-deep);
  font-size: 14px;
}

.notice-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.notice-box .mini-list {
  margin: 0;
}

.share-card {
  border-color: rgba(50, 122, 242, 0.24);
}

.share-poster {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 16px;
  border: 1px solid rgba(50, 122, 242, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(50, 122, 242, 0.12) 0%, rgba(128, 196, 255, 0.16) 52%, rgba(255, 255, 255, 0.94) 100%),
    #ffffff;
  display: grid;
  gap: 14px;
}

.share-poster::after {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 180px;
  height: 92px;
  border: 1px solid rgba(50, 122, 242, 0.14);
  border-radius: 24px;
  transform: rotate(-12deg);
}

.share-poster > * {
  position: relative;
  z-index: 1;
}

.share-poster-top,
.share-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-poster-top span,
.share-code span,
.ai-lead span,
.ai-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.share-poster-top strong,
.share-code strong {
  color: var(--blue-deep);
  font-size: 14px;
}

.share-poster-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.share-poster-main strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.share-poster-main p,
.share-poster-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.share-type {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), #72baff);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 950;
}

.share-code {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(50, 122, 242, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.share-code strong {
  overflow-wrap: anywhere;
  text-align: right;
  letter-spacing: 0;
}

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

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

.share-stats .summary-tile {
  min-height: 72px;
}

.share-source-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-report-card {
  border-color: rgba(117, 103, 255, 0.2);
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

.ai-lead {
  padding: 14px;
  border: 1px solid rgba(117, 103, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  display: grid;
  gap: 8px;
}

.ai-lead strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.ai-lead p {
  margin: 0;
}

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

.ai-block {
  min-height: 128px;
  padding: 12px;
  border: 1px solid rgba(219, 233, 251, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  display: grid;
  align-content: start;
  gap: 8px;
}

.ai-block p {
  margin: 0;
}

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

.metric-row {
  display: grid;
  grid-template-columns: 74px 1fr 38px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.metric-row strong {
  color: var(--ink);
}

.metric-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeaf7;
}

.metric-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.unlock-box {
  display: grid;
  gap: 10px;
}

.field-help {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.input-field,
.select-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 0 12px;
  color: var(--ink);
  outline: 0;
}

.input-field:focus,
.select-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 122, 242, 0.14);
}

.empty-state {
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
}

.empty-state img {
  width: 98px;
  height: 98px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(35, 87, 158, 0.14);
}

.report-pending .panel {
  width: 100%;
  text-align: left;
}

.lookup-panel {
  width: 100%;
  text-align: left;
}

.lookup-result {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

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

.mini-list li {
  padding: 10px 12px;
  border: 1px solid rgba(219, 233, 251, 0.9);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.legal-links {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legal-links span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.legal-link {
  min-height: 34px;
  padding: 0;
  background: transparent;
  color: var(--blue-deep);
  font-weight: 850;
}

.legal-link:focus-visible {
  outline: 3px solid rgba(50, 122, 242, 0.18);
  outline-offset: 3px;
}

.legal-page {
  gap: 16px;
}

.legal-page > h2 {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 14px;
}

.legal-section {
  display: grid;
  gap: 10px;
}

.legal-section h3 {
  color: var(--ink);
  font-size: 16px;
}

.legal-notice .secondary-button {
  justify-self: start;
}

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

.summary-tile {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(219, 233, 251, 0.9);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.summary-tile strong {
  color: var(--blue-deep);
  font-size: 20px;
}

.summary-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 30;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 420px);
  min-height: 44px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 14px;
  box-shadow: var(--shadow);
}

@media (hover: hover) {
  .version-card,
  .report-card,
  .panel,
  .answer-option,
  .primary-button,
  .secondary-button,
  .icon-button,
  .tab-button {
    transition:
      transform 0.15s ease,
      border-color 0.15s ease,
      background 0.15s ease,
      box-shadow 0.15s ease;
  }

  .version-card:hover,
  .report-card:hover,
  .panel:hover {
    border-color: rgba(50, 122, 242, 0.32);
  }

  .primary-button:hover:not(:disabled),
  .secondary-button:hover:not(:disabled),
  .icon-button:hover {
    transform: translateY(-1px);
  }
}

@media (min-width: 860px) {
  body {
    display: grid;
    place-items: center;
    padding: 28px;
  }

  .app-shell {
    min-height: min(920px, calc(100vh - 56px));
    border-radius: 34px;
  }

  .topbar {
    position: relative;
  }

  .tabbar {
    position: absolute;
    left: 0;
    width: 100%;
    transform: none;
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 14px 14px calc(104px + env(safe-area-inset-bottom));
  }

  .screen {
    gap: 14px;
  }

  .report-card,
  .panel {
    padding: 14px;
  }

  .report-card h2,
  .panel h2 {
    align-items: flex-start;
  }

  .report-card h2::before,
  .panel h2::before {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .type-lockup,
  .version-card,
  .result-strip,
  .code-line,
  .share-poster-main,
  .ai-block-grid {
    grid-template-columns: 1fr;
  }

  .type-code {
    justify-self: start;
  }

  .version-card .primary-button,
  .version-card .secondary-button,
  .code-line .secondary-button {
    width: 100%;
  }

  .report-digest,
  .manual-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .overview-score {
    width: 100%;
    min-height: 74px;
    grid-template-columns: auto 1fr;
    justify-content: start;
    text-align: left;
    padding: 0 16px;
  }

  .report-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    top: 6px;
    gap: 6px;
    padding: 7px;
  }

  .report-actions .primary-button,
  .report-actions .secondary-button {
    min-height: 42px;
    padding: 0 6px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.15;
  }

  .report-toc {
    padding-right: 0;
  }

  .toc-scroll {
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .toc-button {
    min-height: 38px;
    padding: 0 13px;
  }

  .share-poster-top,
  .share-code {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-code strong {
    text-align: left;
  }

  .score-line,
  .insight-row {
    grid-template-columns: 1fr;
  }

  .mini-list li {
    padding: 9px 10px;
    font-size: 13px;
  }

  .chart-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .app-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-hero {
    min-height: 300px;
    padding: 22px 16px;
  }

  .home-hero h1 {
    font-size: 27px;
  }

  .hero-band,
  .split-summary,
  .share-stats,
  .button-row {
    grid-template-columns: 1fr;
  }

  .hero-band img {
    width: 68px;
    height: 68px;
  }
}
