:root {
  --purple: #703fa5;
  --violet: #aa34b8;
  --pink: #ea3198;
  --pale: #f3d8f0;
  --ink: #17131b;
  --muted: #6c6870;
  --line: #ddd8e2;
  --shadow: 0 3px 14px #3a23451c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #faf9f8;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.75;
}
img { max-width: 100%; }

.report {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 18px;
}
.sheet {
  padding: 28px 0 18px;
}
.result-sheet { padding-top: 0; }
.explanation-sheet {
  margin-top: 55px;
  padding-top: 34px;
  border-top: 5px solid #f1ebf5;
}

.sheet-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: center;
  margin: 0 calc(50% - 50vw) 28px;
  padding: 28px max(24px, calc((100vw - 1280px) / 2)) 30px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #ebe7ee;
}
.result-sheet .sheet-header {
  display: block;
  width: 100%;
  margin: 0 0 28px;
  padding: 25px 0 22px;
  background: #fff;
  border: 0;
}
.result-sheet .brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
}
.result-sheet .brand img { width: 58px; height: 58px; object-fit: contain; margin: 0; }
.result-sheet .brand h1 { margin: 0; font-size: 25px; letter-spacing: .04em; line-height: 1.3; }
.sheet-name {
  padding: 10px 16px;
  color: #fff;
  background: var(--purple);
  border-radius: 10px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.header-copy { margin: 21px 0 19px; font-size: 18px; line-height: 1.65; }
.result-sheet .profile {
  min-height: 56px;
  padding: 12px 28px;
  display: flex;
  justify-content: center;
  gap: 105px;
  background: #f4f4f4;
  border-radius: 18px;
}
.result-sheet .profile div { display: flex; align-items: center; gap: 14px; margin: 0; }
.result-sheet .profile dt, .result-sheet .profile dd { font-size: 18px; }
.result-sheet .profile dd { padding: 0; background: transparent; border: 0; }
.detail-heading { margin: 0 0 26px; }
.detail-heading p { margin: 21px 0 0; font-size: 18px; line-height: 1.65; }
.brand { display: block; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.45; }
.brand img { display: block; width: 95px; height: 60px; object-fit: contain; margin: auto; }
.title-row { display: flex; align-items: center; gap: 18px; }
.title-row h1 { margin: 0; font-size: 34px; letter-spacing: .04em; line-height: 1.3; white-space: nowrap; }
.edition { padding: 5px 18px; color: var(--purple); border: 2px solid var(--purple); border-radius: 999px; font-weight: 700; white-space: nowrap; }
.intro-row { display: grid; grid-template-columns: 1fr; gap: 13px; margin-top: 18px; }
.intro-row > strong {
  padding: 10px 16px;
  color: #fff;
  background: var(--purple);
  border-radius: 5px;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
}
.intro-row p { margin: 0; font-size: 14px; line-height: 1.7; }
.profile { margin: 0; padding: 12px; background: #f1f0f1; border-radius: 14px; }
.profile div { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; margin: 6px; }
.profile dt { font-size: 14px; font-weight: 700; white-space: nowrap; }
.profile dd { margin: 0; padding: 7px 9px; font-size: 15px; white-space: nowrap; background: #fff; border: 1px solid #aaa; border-radius: 5px; }

.sheet > section { margin-top: 28px; }
.sheet > section > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 18px;
  font-size: 26px;
  line-height: 1.4;
}
.sheet > section > h2 > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 50%;
  background: var(--purple);
  font-size: 22px;
}
.result-sheet > section > h2 > span {
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.sheet > section > h2 small { font-size: 15px; }
.type-summary {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}
.type-visual,
.type-name,
.type-pair {
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 24px #3a23451c;
}
.type-visual { display: grid; place-items: center; min-height: 402px; }
.type-visual img { width: 275px; mix-blend-mode: multiply; }
.type-content { display: grid; grid-template-rows: 156px 1fr; gap: 32px; }
.type-name,
.type-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}
.type-name strong { font-size: clamp(38px, 3.3vw, 48px); line-height: 1.35; }
.type-pair img {
  display: block;
  width: min(100%, 470px);
  height: auto;
}

.type-grid, .level-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.type-grid article {
  display: grid;
  grid-template-columns: max-content max-content minmax(100px, 1fr);
  align-items: center;
  column-gap: 18px;
  min-height: 130px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.type-grid article > b { margin: 0; color: var(--purple); font-size: 21px; }
.type-grid article:nth-child(n+3) > b { color: #ca329e; }
.type-grid img { width: 82px; height: 72px; object-fit: contain; }
.type-grid article > strong { justify-self: end; font-size: 39px; line-height: 1.2; }
.type-grid article > strong small { margin-left: 5px; color: #95919a; font-size: 17px; font-weight: 400; }

.table-wrap { margin-top: 20px; overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--purple); border-radius: 10px; font-size: 14px; background: #fff; }
th, td { padding: 11px 14px; border-right: 1px solid #d4ced9; border-bottom: 1px solid #d4ced9; text-align: center; }
thead th { color: #fff; background: var(--purple); }
tbody th { color: var(--purple); white-space: nowrap; }
tbody th img { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 9px; }
tr:last-child > * { border-bottom: 0; }
tr > *:last-child { border-right: 0; }

.emotion-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.emotion-list article {
  position: relative;
  min-height: 218px;
  padding: 82px 24px 30px;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.emotion-list h3, .stack h3, .level-grid h3 {
  margin: 0;
  padding: 8px 15px;
  color: #fff;
  background: var(--purple);
  text-align: center;
}
.emotion-list h3 { position: absolute; inset: 16px 16px auto; }
.emotion-list article:nth-child(2) h3, .level-grid article:nth-child(2) h3 { background: var(--violet); }
.metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 115px;
  align-items: center;
  gap: 32px;
  min-height: 70px;
}
.metric p { margin: 0; font-size: 16px; line-height: 1.7; }
.metric strong {
  justify-self: end;
  margin: 0;
  font-size: 44px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.metric strong small { color: #96929a; font-size: 17px; }
.scale {
  clear: both;
  height: 14px;
  margin-top: 14px;
  border: 1px solid #8e8991;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), #8e8991 calc(25% - 1px) 25%);
}
.scale i { display: block; height: 100%; background: var(--purple); }
.emotion-list article:nth-child(2) .scale i { background: var(--violet); }

.detail-type {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 38px;
  align-items: stretch;
  padding: 24px;
  background: #fff;
}
.detail-type > img { align-self: center; width: 100%; }
.detail-type-content {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
}
.detail-type-name h3 { margin: 0; padding: 10px 18px; color: var(--purple); background: var(--pale); border: 1px solid var(--purple); border-radius: 7px; text-align: center; font-size: 32px; }
.detail-type-name h3 small { float: right; margin-top: 9px; font-size: 14px; }
.traits-image {
  display: block;
  align-self: center;
  width: min(100%, 720px);
  height: auto;
  object-fit: contain;
}
.analysis-text { padding: 20px 24px; background: var(--pale); border-radius: 10px; font-size: 15px; }
.analysis-text p { margin: 0; }
.stack { display: grid; grid-template-columns: 1fr; gap: 18px; }
.stack article, .level-grid article { overflow: hidden; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.impressions-body {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 0 22px;
}
.impressions-body > img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.impressions dl { margin: 0; padding: 0; }
.impressions dl > div { display: grid; grid-template-columns: 200px 1fr; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.impressions dl > div:last-child { border: 0; }
.impressions dt { color: var(--purple); font-weight: 700; text-align: center; }
.impressions dd { margin: 0; }
.ng > div { display: grid; grid-template-columns: 100px 1fr; align-items: center; padding: 18px 25px; }
.ng img { display: block; width: 48px; height: 48px; justify-self: center; object-fit: contain; }
.ng p { margin: 0; }
.level-grid article > div { display: grid; grid-template-columns: 90px 1fr; align-items: center; padding: 24px 28px; }
.level-grid img { display: block; width: 72px; height: 72px; object-fit: contain; }
.level-grid p { margin: 0; }

footer { margin-top: 22px; color: #4f4c52; font-size: 12px; }
footer span { float: right; }

@media (max-width: 900px) {
  .sheet-header { grid-template-columns: 120px minmax(0, 1fr) 250px; gap: 16px; }
  .title-row h1 { font-size: 27px; }
  .type-summary { grid-template-columns: 210px 1fr; }
  .type-visual { min-height: 250px; }
  .type-content { grid-template-rows: 104px 1fr; gap: 16px; }
  .type-name, .type-pair { min-height: 104px; }
  .type-pair strong { width: 86px; height: 86px; font-size: 18px; }
  .detail-type { grid-template-columns: 210px 1fr; }
}

@media (max-width: 640px) {
  .report { width: min(100% - 28px, 1280px); }
  .result-sheet .sheet-header {
    width: 100%;
    padding: 18px 0 20px;
    overflow: hidden;
  }
  .result-sheet .brand {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
  }
  .result-sheet .brand img {
    width: 42px;
    height: 42px;
  }
  .result-sheet .brand h1 {
    font-size: 19px;
  }
  .sheet-name {
    padding: 9px 12px;
    font-size: 20px;
  }
  .header-copy {
    margin: 15px 2px;
    font-size: 14px;
    line-height: 1.65;
  }
  .result-sheet .profile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
  }
  .result-sheet .profile div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .result-sheet .profile dt,
  .result-sheet .profile dd {
    min-width: 0;
    font-size: 14px;
  }
  .result-sheet .profile dd {
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .sheet-header { grid-template-columns: 1fr; padding-top: 18px; padding-bottom: 20px; }
  .title-row { justify-content: center; flex-wrap: wrap; }
  .title-row h1 { font-size: 25px; }
  .intro-row { grid-template-columns: 1fr; }
  .intro-row > strong { font-size: 17px; }
  .detail-heading p { margin-top: 14px; font-size: 14px; }
  .profile { padding: 10px 16px; }
  .profile div { grid-template-columns: 96px minmax(0, 1fr); }
  .sheet > section > h2 { align-items: flex-start; font-size: 21px; }
  .sheet > section > h2 > span { width: 36px; height: 36px; font-size: 18px; }
  .type-summary, .detail-type { grid-template-columns: 1fr; gap: 14px; }
  .type-visual { min-height: 210px; }
  .type-content { grid-template-rows: auto; gap: 14px; }
  .type-visual img, .detail-type > img { width: 210px; margin: auto; }
  .type-name { min-height: 112px; padding: 24px 16px; }
  .type-name strong { font-size: 30px; }
  .type-pair { min-height: 128px; padding: 20px 16px; }
  .type-pair strong { width: 76px; height: 76px; font-size: 16px; }
  .type-grid, .level-grid { grid-template-columns: 1fr; }
  .type-grid article {
    grid-template-columns: minmax(76px, 1fr) 72px minmax(76px, 1fr);
    gap: 10px;
    min-height: 96px;
    padding: 14px 18px;
  }
  .type-grid article > b {
    justify-self: start;
    font-size: 18px;
  }
  .type-grid article > img {
    justify-self: center;
    width: 58px;
    max-height: 58px;
    object-fit: contain;
  }
  .type-grid article > strong {
    justify-self: end;
    font-size: 34px;
  }
  .table-wrap { margin-right: -14px; }
  .emotion-list article {
    min-height: 190px;
    padding: 72px 16px 22px;
  }
  .emotion-list h3 { inset: 14px 14px auto; }
  .metric {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 12px;
    min-height: 64px;
  }
  .metric p { font-size: 14px; line-height: 1.55; }
  .metric strong { font-size: 34px; }
  .metric strong small { font-size: 14px; }
  .scale { margin-top: 12px; }
  .detail-type h3 { font-size: 25px; }
  .detail-type h3 small { float: none; margin-left: 6px; }
  .traits-image { width: 100%; }
  .impressions-body {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 14px 16px 0;
  }
  .impressions-body > img {
    width: 82px;
    height: 82px;
    margin: 0 auto 4px;
  }
  .impressions dl > div { grid-template-columns: 1fr; gap: 4px; }
  .impressions dt { text-align: left; }
  .level-grid article > div, .ng > div { grid-template-columns: 64px 1fr; padding: 18px 12px; }
  .level-grid img { width: 58px; height: 58px; }
  footer span { float: none; display: block; margin-top: 8px; }
}

@media print {
  body { background: #fff; }
  .report { width: 1280px; }
  .sheet { break-after: page; }
}
