/* variables */

:root {
  --easeBound: cubic-bezier(0,1.14,.19,1.02);
  --easeOutQuart: cubic-bezier(0.25,1,0.5,1);
  --easeOutExpo: cubic-bezier(0.19,1,0.22,1);
  --headerHeight: 44px;
  --headerLogoHeight: 20px;
  --indicatorHeight: 70px;
  --bodyHeight: calc(100dvh - var(--headerHeight));
  --formHeight: calc(100dvh - var(--headerHeight) - var(--indicatorHeight));
  --gutter: 25px;
  --gutterX: 16px;
  --gutterY: 22px;
  --cardRadius: 12px;
  --globalStateAnimationDuration: 0.8s;
  --formStateAnimationDuration: 0.65s;
  --formStateAnimationDelay: 0.15s;

  --colorPrimary: #002f37; 
  --colorHeader: #03242b;
  --colorFooter: #1E293B;
  --colorOrange: #ea5619;
  --colorBeige: #fff5f0;

  --colorWhite: #ffffff;
  --colorCard: #f1f1f1;
  --colorBorder: #e5e6e5;
  --colorFooterNote: #D2D3D1;
  --colorGray: #606060;
  --colorNote: #484848;
}

@media (min-width: 700px) {
  :root {
    --headerHeight: 60px;
    --headerLogoHeight: 28px;
  }
}

@media (min-width: 940px) {
  :root {
    --headerHeight: 80px;
    --headerLogoHeight: 36px;
    --indicatorHeight: 160px;
    --gutterX: 16px;
    --gutterY: 90px;
  }
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  overflow-y: scroll;
  overflow-x: hidden;
}

/* utils */

.card {
  background: var(--colorCard);
  border-radius: var(--cardRadius);
  max-width: 900px;
}

.fullscreen {
  width: 100dvw;
  height: var(--bodyHeight);
}

.button {
  background: var(--colorOrange);
  color: var(--colorWhite);
  border: none;
  border-radius: 8px;
  padding: .6em;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}
.button::after {
  content: '▼';
  font-size: .8em;
  margin-left: .5em;
  display: inline-block;
  transform: scale(1, 0.8);
  vertical-align: .1em;
}

.button-container {
  max-width: 242px;
  margin: 0 auto;
}

.button-back {
  margin-top: .5em;
  background: var(--colorWhite);
  border: none;
  border-radius: 8px;
  padding: .6em;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}
.button-back::before {
  content: '▼';
  font-size: .8em;
  margin-right: .5em;
  display: inline-block;
  transform: scale(1, 0.8) rotate(90deg);
  vertical-align: .1em;
}


.button:disabled {
  background: var(--colorBorder);
  color: var(--colorGray);
  cursor: not-allowed;
}

@media (min-width: 940px) {
  .button {
    font-size: 18px;
  }
}

/* header */

header {
  height: var(--headerHeight);
  background: var(--colorHeader);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--colorOrange);
}

header svg {
  fill: var(--colorOrange);
  display: inline-block;
  height: var(--headerLogoHeight);
}

/* container */

.container {
  overflow: hidden;
  background: var(--colorPrimary);
  color: var(--colorPrimary);
}

/* introduction */

.introduction {
  transition: margin-top var(--globalStateAnimationDuration) var(--easeOutExpo);
  margin-top: calc(0px - (var(--global-state) - 1) * var(--bodyHeight));
  padding: var(--gutterY) var(--gutterX);
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.introduction::-webkit-scrollbar {
  display: none;
}

.introduction-inner {
  margin: 0 auto;
  padding: 22px 16px;
}

.introduction h1 {
  font-size: min(19px, calc(19 / 390 * 100dvw));
  font-weight: 700;
  line-height: 2em;
  letter-spacing: -0.05em;
  margin-top: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.introduction h1 i {
  font-style: normal;
  display: inline-block;
  line-height: 1;
  padding: .75em 0;
  border-top: 1px solid var(--colorPrimary);
  border-bottom: 1px solid var(--colorPrimary);
  margin-bottom: .5em;
}

.introduction h1 span {
  display: block;
}

.introduction h1 strong {
  font-weight: 700;
  font-size: 2.15em;
}

.introduction p {
  color: var(--colorGray);
  font-size: 13px;
  text-align: center;
}

.introduction picture {
  margin: 10px 0;
}

.introduction img {
  max-width: calc(100% + 32px);
  margin-left: -16px;
}


.introduction-start {
  text-align: center;
}

.introduction-start p {
  text-decoration: underline;
  margin-top: 1em;
}

/* form */

.form {
  position: static;
}

.form-indicator {
  height: var(--indicatorHeight);
  text-align: center;
  padding: 16px 16px 0;
}

.form-indicator span {
  display: block;
  color: var(--colorWhite);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: .25em;
}

@media (min-width: 940px) {
  .form-indicator {
    width: 900px;
    padding-top: 60px;
    margin: 0 auto;
  }
  .form-indicator span {
    font-size: 24px;
  }
}

.form-indicator span::before {
  transition: content var(--formStateAnimationDuration) var(--easeBound);
  transition-delay: calc(var(--formStateAnimationDelay) * 2);
  transition-behavior: allow-discrete;
}
[data-form-state="1"] .form-indicator span::before {
  content: '質問 1 / 8';
}
[data-form-state="2"] .form-indicator span::before {
  content: '質問 2 / 8';
}
[data-form-state="3"] .form-indicator span::before {
  content: '質問 3 / 8';
}
[data-form-state="4"] .form-indicator span::before {
  content: '質問 4 / 8';
}
[data-form-state="5"] .form-indicator span::before {
  content: '質問 5 / 8';
}
[data-form-state="6"] .form-indicator span::before {
  content: '質問 6 / 8';
}
[data-form-state="7"] .form-indicator span::before {
  content: '質問 7 / 8';
}
[data-form-state="8"] .form-indicator span::before {
  content: '質問 8 / 8';
}
[data-form-state="9"] .form-indicator span::before {
  content: '回答完了';
}

.form-indicator i {
  display: block;
  background: var(--colorBorder);
  width: 100%;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.form-indicator i::before {
  content: '';
  display: block;
  width: inherit; 
  height: inherit;
  border-radius: inherit;
  background: var(--colorOrange);
  position: absolute;
  top: 0;
  transition: left var(--formStateAnimationDuration) var(--easeBound);
  transition-delay: var(--formStateAnimationDelay);
  left: min(
    calc(-100% + (100% / 8 * var(--form-state))),
    0%
  );
}

@media (min-width: 940px) {
  .form-indicator i {
    height: 8px;
    border-radius: 4px;
  }
}

.form-entity {
  width: 100%;
  height: var(--formHeight);
  padding: 0 16px 22px 16px;
  display: flex;
  align-items: flex-start;
  overflow-y: scroll;
  overflow-x: hidden;
  gap: calc(16px * 2);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.form-entity::-webkit-scrollbar {
  display: none;
}

.form-content {
  flex: 0 0 calc(100dvw - 16px * 2);
}

.form-content:first-of-type {
  transition: margin-left var(--formStateAnimationDuration) var(--easeBound);
  transition-delay: var(--formStateAnimationDelay);
  margin-left: calc(0px - (var(--form-state) - 1) * 100dvw);
}

@media (min-width: 940px) {
  .form-entity {
    padding: 0 calc((100dvw - 900px) / 2);
    gap: calc((100dvw - 900px));
  }
  .form-content {
    flex: 0 0 900px;
  }
  .form-content:first-of-type {
    margin-left: calc(0px - (var(--form-state) - 1) * 100dvw);
  }
}

.form-item {
  border: none;
  padding: 0 16px 16px; 
}

@media (min-width: 940px) {
  .form-item {
    padding: 0 50px 60px 50px; 
  }
}

.form-item-title {
  margin: 25px 0;
  display: flex;
  align-items: center;
}

.form-item-title i {
  font-style: normal;
  display: inline-block;
  width: 2.5em;
  height: 2.5em;
  color: var(--colorWhite);
  background: var(--colorOrange);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  padding: 0.75em 0;
  text-align: center;
  margin-right: 0.75em;
}

.form-item-title span {
  width: calc(100% - 3.25em);
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15em;
  letter-spacing: -0.05em;
}

@media (min-width: 940px) {
  .form-item-title {
    margin: 60px 0;
  }
  .form-item-title i {
    font-size: 16px;
    width: 2.75em;
    height: 2.75em;
    margin-right: 2em;
  }
  .form-item-title span {
    font-size: 24px;
  }
}

.form-item label {
  display: block;
  margin-bottom: 7px;
}

.form-item label:last-of-type {
  margin-bottom: 0;
}

.form-item label input {
  display: none;
}

.form-item label div {
  font-size: min(15px, calc(15 / 390 * 100dvw));
  letter-spacing: -0.05em;
  padding: 0 18px;
  box-shadow: 0 0 0 1px var(--colorBorder);
  border-radius: 7px;
  background: var(--colorWhite);
  display: flex;
  align-items: center;
  height: 4em;
}

.form-item label div i {
  font-style: normal;
  display: inline-block;
  margin-right: .5em;
}

.form-item label div i::before {
  font-size: .8em;
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background: var(--colorBorder);
  border-radius: 50%;
  margin-right: 1em;
}

.form-item label div span {
  display: inline-block;
  width: calc(100% - 3em);
}

.form-item label input:checked + div {
  background: var(--colorBeige);
  box-shadow: 0 0 0 2px var(--colorOrange);
}

.form-item label input:checked + div i::before {
  background: var(--colorOrange);
}

@media (min-width: 940px) {
  .form-item label {
    margin-bottom: 10px;
  }
  .form-item label div {
    font-size: 16px;
  }
  .form-item label div span br {
    display: none;
  }
}

.form-nav {
  margin-top: 10px;
  width: 75px;
}

.form-enquete {
  border: none;
  padding: 0 16px 16px 16px; 
  background: var(--colorWhite);
}

.form-enquete-title {
  margin-top: 35px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.form-enquete-text {
  margin-top: 15px;
  font-size: 13px;
  text-align: center;
}

@media (min-width: 940px) {
  .form-enquete {
    padding: 0 70px 35px 70px;
  }
  .form-enquete-title {
    font-size: 28px;
  }
  .form-enquete-text {
    font-size: 14px;
  }
  .form-enquete-text br {
    display: none;
  }
}

[data-form-select] {
  display: block;
  margin-top: 22px;
}

[data-form-select] span {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: .5em;
  display: block;
}

@media (min-width: 940px) {
  [data-form-select] {
    margin-top: 40px;
  }
  [data-form-select] span {
    font-size: 16px;
    margin-bottom: 1em;
  }
}

[data-form-select] nav {
  display: grid;
  grid-template-rows: 0fr;
  transition: .325s grid-template-rows var(--easeOutQuart);
  margin-top: 7px;
}

[data-form-select="active"] nav{
  grid-template-rows: 1fr;
}

[data-form-select] ul {
  overflow: hidden;
  outline-offset: -1px;
  border-radius: 7px;
  box-shadow: transparent;
  font-size: 15px;
}

[data-form-select="active"] ul {
  box-shadow: 0 0 0 1px var(--colorBorder);
}

@media (min-width: 940px) {
  [data-form-select] ul {
    font-size: 14px;
  }
}

[data-form-select] li {
  padding: calc(22px / 3) 16px;
}
[data-form-select] li:first-of-type {
  padding-top: calc(22px / 3 * 2);
}
[data-form-select] li:last-of-type {
  padding-bottom: calc(22px / 3 * 2);
}

[data-form-select] li[data-active] {
  background: var(--colorBeige);
}

[data-form-select] div {
  padding: 1em;
  box-shadow: 0 0 0 1px var(--colorBorder);
  border-radius: 7px;
  position: relative;
}

[data-form-select] div::after {
  content: '';
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--colorGray);
  border-bottom: 1px solid var(--colorGray);
  transform: rotate(-45deg);
  position: absolute;
  top: 50%;
  margin-top: -8px;
  right: 1em;
  transition: transform .2s var(--easeOutQuart),
    margin-top .2s var(--easeOutQuart);
}

[data-form-select="active"] div::after {
  transform: rotate(135deg);
  margin-top: -2px;
}

[data-form-select] input {
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  width: 100%;
}

.form-submit {
  padding: 25px 0;
  text-align: center;
}

.form-submit .button-back {
  display: block;
}

/* result */

.result {
  background: var(--colorCard);
  padding: 22px 16px;
}

.result.fullscreen {
  overflow-y: scroll;
}

.result-item {
  background: var(--colorWhite);
  padding: 22px 16px;
  border-radius: var(--cardRadius);
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.25);
}

@media (min-width: 940px) {
  .result {
    padding: 40px max(20px, calc(100dvw - 900px) / 2);
  }
  .result-item {
    padding: 40px 50px 70px 50px;
    position: relative;
  }
}

.result-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-item-header h2 {
  font-size: 19px;
  line-height: 1.25em;
  display: flex;
  flex-wrap: wrap;
}

.result-item-header h2 i {
  font-style: normal;
  font-size: .75em;
  width: 1.5em;
  height: 1.5em;
  padding: .25em;
  line-height: 1;
  display: inline-block;
  text-align: center;
  background: var(--colorOrange);
  color: var(--colorWhite);
  border-radius: 50%;
  margin-right: .25em;
  margin-top: 0.15em;
}

.result-item-header h2 span {
  font-size: 13px;
  font-weight: 400;
  display: inline-block;
  width: 100%;
}

.result-item-header h2 strong {
  width: calc(100% - 30px);
}

.result-item-header figure {
  width: 30%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #8eb1b2;
  overflow: hidden;
}

.result-item-header figure img {
  width: 90%;
  padding: 5%;
  box-sizing: content-box;
}

@media (min-width: 940px) {
  .result-item-header {
    display: block;
  }
  .result-item-header h2 {
    text-align: center;
    font-size: 36px;
    line-height: 1.5em;
    display: block;
  }
  .result-item-header h2 i {
    margin-top: 0;
  }
  .result-item-header h2 span {
    font-size: 20px;
  }
  .result-item-header h2 strong {
    width: auto;
  }
  .result-item-header figure {
    width: 120px;
    margin: 15px auto 0px auto;
  }
}

.result-item-feature {
  margin-top: 15px;
  font-size: 15px;
  letter-spacing: -0.05em;
}

.result-item-feature h3 {
  font-size: inherit;
  font-weight: 700;
  margin-bottom: .5em;
}

.result-item-feature li {
  margin-top: .35em;
}

.result-item-feature li::before {
  content: '';
  width: .3em;
  height: .3em;
  display: inline-block;
  background: var(--colorOrange);
  vertical-align: .2em;
  margin-right: .5em;
  margin-left: .25em;
  border-radius: 50%;
}

@media (min-width: 940px) {
  .result-item-feature {
    margin-top: 25px;
    text-align: center;
  }
  .result-item-feature h3 {
    font-size: 18px;
  }
  .result-item-feature ul {
    display: inline-block;
    text-align: left;
    font-size: 14px;
  }
  .result-item-feature li {
    margin-top: .75em;
  }
  .result-item-feature li::before {
    content: '';
    width: .5em;
    height: .5em;
    margin-right: 1em;
    margin-left: 0;
    vertical-align: .15em;
  }
}

.result-item-description {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.5em;
  letter-spacing: -0.05em;
}

@media (min-width: 940px) {
  .result-item-description {
    max-width: 400px;
    margin: 20px auto 0 auto;
    text-align: center;
    font-size: 14px;
    line-height: 2em;
  }
}

.result-item-recommends {
  margin-top: 27px;
}

.result-item-recommends h3 {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
}

.result-item-recommends nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-item-recommends a {
  padding: 0.8em 1.5em 0.8em 0.5em;
  height: 3.6em;
  background: var(--colorOrange);
  color: var(--colorWhite);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-size: min(14px, calc(14 / 390 * 100dvw));
  font-weight: 700;
  letter-spacing: -0.05em;
  border-radius: 6px;
}

.result-item-recommends a::after {
  content: '';
  border-top: transparent .4em solid;
  border-bottom: transparent .4em solid;
  border-left: white .6em solid;
  position: absolute;
  top: 50%;
  margin-top: -0.3em;
  right: 0.5em;
}

.result-item-recommends a span {
  display: block;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1.15em;
}

@media (min-width: 940px) {
  .result-item-recommends nav {
    max-width: 600px;
    margin: 0 auto;
  }
  .result-item-recommends h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  .result-item-recommends a {
    padding: 0.8em 2.5em 0.8em 0.5em;
    font-size: 15px;
    font-weight: 400;
  }
  .result-item-recommends a::after {
    border-top: transparent .6em solid;
    border-bottom: transparent .6em solid;
    border-left: white .9em solid;
    margin-top: -0.6em;
    right: 1em;
  }
}

.result-item-notice {
  margin-top: .5em;
  font-size: 12px;
  color: var(--colorGray);
}

@media (min-width: 940px) {
  .result-item-notice {
    text-align: center;
  }
}

.result-item-other {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
}

.result-item-other a {
  text-decoration: underline;
}

@media (min-width: 940px) {
  .result-item-other {
    font-size: 12px;
  }
  .result-item-other a {
    font-weight: 700;
  }
}

.result-item-onemore {
  margin-top: 25px;
  text-align: center;
  font-size: 13px;
  color: var(--colorGray);
}

.result-item-onemore span {
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 940px) {
  .result-item-onemore {
    margin-top: 50px;
    font-size: 14px;
  }
}

.result-item-share {
  margin-top: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.result-item-share span {
  font-size: 13px;
  color: var(--colorGray);
}

.result-item-share a {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: black;
  color: var(--colorWhite);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 10px;
}

.result-item-share a:nth-of-type(2) {
  background: #4267b2;
}

.result-item-share a:nth-of-type(3) {
  background: #0a66c2;
}

@media (min-width: 940px) {
  .result-item-share {
    position: absolute;
    bottom: 60px;
    left: 50px;
    width: auto;
  }
}

/* footer */

footer {
  background: var(--colorFooter);
  font-size: 12px;
  line-height: 20px;
  padding: 16px 22px;
}

footer dl {
  display: grid;
  grid-template-rows: auto 0fr;
  transition: grid-template-rows .325s var(--easeOutQuart);
}

footer dl[data-active="true"] {
  grid-template-rows: auto 1fr;
}

footer dt {
  color: var(--colorWhite);
  margin-bottom: 10px;
  cursor: pointer;
}

footer dd {
  color: var(--colorFooterNote);
  overflow: hidden;
  margin-bottom: 20px;
  max-width: 560px;
}

footer dd ul {
  color: var(--colorWhite);
  margin-top: 1em;
}

footer dd small {
  display: block;
  margin-top: 0.75em;
}

footer dd p {
  margin-top: .75em;
}

footer p {
  color: var(--colorFooterNote);
}

/* consent-modal */
.consent-modal {
  width: 100dvw;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, .325);
  overflow-x: hidden;
  overflow-y: scroll;
  padding: 22px 16px;
  backdrop-filter: blur(2px);
}

.consent-modal[data-modal] {
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--globalStateAnimationDuration) var(--easeOutExpo);
}
.consent-modal[data-modal="active"] {
  pointer-events: auto;
  opacity: 1;
}

.consent-modal-body {
  --gutter: 22px;
  background: white;
  border-radius: var(--cardRadius);
  margin: min(10dvw, 10dvh) auto;
  padding: var(--gutter);
}

@media (min-width: 940px) {
  .consent-modal-body {
    --gutter: 50px;
  }
}

.consent-modal-title {
  text-align: center;
  font-size: 18px;
  line-height: 1.25em;
  color: var(--colorPrimary);
  margin-bottom: var(--gutter);
}

@media (min-width: 940px) {
  .consent-modal-title {
    font-size: 24px;
  }
}

.consent-modal-items {
  font-size: 13px;
  line-height: 1.75em;
  font-weight: 400;
  color: var(--colorNote);
}

.consent-modal-items li {
  display: flex;
  margin-top: 1.5em;
}

.consent-modal-items li::before {
  content: '・';
  display: inline-block;
}
.consent-modal-items li p {
  text-wrap: auto;
  word-break: break-all;
}

.consent-modal-items li small {
  display: block;
  width: 100%;
  opacity: 0.7;
  text-indent: -1em;
  padding-left: 1em;
  line-height: 1.2em;
  margin-top: .5em;
}

.consent-modal-nav {
  margin-top: var(--gutter);
  display: flex;
  justify-content: center;
  gap: calc(var(--gutter) / 2);
  flex-wrap: wrap;
}

.consent-modal-nav button {
  border: none;
  border-radius: 8px;
  padding: .6em;
  font-size: 16px;
  font-weight: 700;
  width: 12em;
  background: var(--colorBorder);
  color: var(--colorPrimary);
}

.consent-modal-nav button[data-start-form] {
  background: var(--colorOrange);
  color: var(--colorWhite);
}
