:root {
  --ink: #1f1d1a;
  --accent-ink: #333;
  --shadow: 0 18px 50px rgba(31, 29, 26, 0.12);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-style: normal;
  font-weight: 400;
  font-family: "Noto Sans JP", sans-serif;
  font-display: swap;
  user-select: none;
}

.page.online-quote {
  width: 100%;
  padding: 0;
  margin: 0 auto;
}

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

.page.online-quote {
  padding: 90px 20px 122px;
}

@media (min-width: 1441px) {
  .page.online-quote {
    padding-left: 0;
    padding-right: 0;
  }
}

.page_ttl {
  margin: 60px auto 0;
  max-width: 1000px;
  text-align: left;
}

.page_ttl .head {
  margin: 0 auto;
  padding: 20px 0 10px;
  color: #5f6165;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.06em;
}

.content .inner,
.relation_area .inner {
  margin: 0 auto;
  max-width: 1000px;
}

.att .comm {
  margin: 0;
  padding: 0;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.7;
}

.block {
  margin: 16px 0 32px;
}

.quote_empty {
  margin: 0 0 24px;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
}

.box_ttl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 18px;
}

.note {
  display: inline-block;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}

.block_items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: start;
  gap: 16px;
  padding-right: 6px;
  max-height: calc(2 * 240px + 16px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (max-width: 1200px) {
  .page.online-quote {
    padding: 72px 24px 96px;
  }

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

  .summary_layout {
    grid-template-columns: 1fr;
  }
}

.block_items::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.block_items_wrap {
  position: relative;
  height: calc(2 * 240px + 16px);
}

.scroll_track {
  position: absolute;
  top: 10px;
  right: 0;
  opacity: 0.7;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.12);
  width: 8px;
  height: 100%;
  pointer-events: none;
}

.scroll_thumb {
  position: absolute;
  top: 10px;
  right: 0;
  opacity: 0;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.45);
  width: 8px;
  height: 24px;
  pointer-events: none;
}

.radio-wr {
  position: relative;
  overflow: hidden;
}

.radio-wr input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  inset: 0;
}

.radio-wr label {
  display: grid;
  gap: 2px;
  cursor: pointer;
  padding: 14px 16px 0;
  min-height: 210px;
}

.radio-wr .item_img {
  display: grid;
  position: relative;
  place-items: center;
  border: 2px solid transparent;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.block.plan .zoom_btn {
  position: absolute;
  right: 4px;
  bottom: 4px;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  background: url("../images/zoom-in.svg") no-repeat center / contain;
  padding: 0;
  width: 34px;
  height: 34px;
}

.radio-wr .item_img.no-img {
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("../images/noimage.png") center / cover no-repeat;
  color: var(--accent-ink);
  font-size: 22px;
}

.radio-wr .item_img .name {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
}

.radio-wr .item_name {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.radio-wr .item_price {
  font-size: 13px;
}

p.step_note {
  margin-top: 44px;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

._price {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 0 16px;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.4;
  text-align: right;
}

.radio-wr input:checked + label .item_img img {
  opacity: 0.8;
  filter: brightness(1.08) saturate(0.85);
}

.radio-wr input:checked + label .item_img {
  border-color: transparent;
}

.radio-wr input:checked + label .item_img::after {
  position: absolute;
  z-index: 2;
  margin: auto;
  inset: 0;
  background: url("../images/check.svg") no-repeat center / contain;
  width: 160px;
  height: 160px;
  pointer-events: none;
  content: "";
}

.radio-wr input:checked + label .item_img::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(0, 0, 0, 0.02);
  pointer-events: none;
  content: "";
}

.image_modal {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  z-index: 10002;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 24px;
}

.image_modal.is-open {
  display: flex;
}

.image_modal_content {
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  background: #fff;
  max-width: min(90vw, 960px);
  max-height: 85vh;
  overflow: hidden;
}

.image_modal_content img {
  display: block;
  width: 100%;
  height: auto;
}

.image_modal_close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  background: #000;
  width: 44px;
  height: 44px;
  padding: 0;
}

.image_modal_close::before,
.image_modal_close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  width: 18px;
  height: 2px;
  content: "";
}

.image_modal_close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.image_modal_close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.price_area {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  background: #7d7d7d;
  padding: 1.8rem 3.6rem;
  width: 100%;
  color: #ffff;
  font-size: 18px;
}

.price_area.in_summary {
  position: static;
  margin-top: 12px;
  border-radius: 0;
  background: transparent;
  padding: 0 14px;
  color: #000;
}

.price_inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  max-width: 1000px;
}

.price_label_left {
  font-weight: 600;
  letter-spacing: 0.08em;
}

.price_row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price_main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.6;
}

.price_label {
  color: #f3ddc7;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.price_value {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
}

.price_unit {
  font-weight: 700;
  font-size: 18px;
}

.price_note {
  font-size: 14px;
  line-height: 1;
}

.price_area #calculation {
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.03em;
}

.quote-step {
  display: none;
}

.quote-step.is-active {
  display: block;
  animation: stepFade 0.3s ease;
}

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

.step_nav {
  margin: 0;
}

.step_status {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--accent-ink);
  font-weight: 600;
}

.step_btn {
  display: flex;
  position: fixed;
  top: 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  visibility: visible;
  opacity: 1;
  z-index: 10001;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  width: 4rem;
  height: 4rem;
  line-height: 0;
}

.step_btn img {
  display: block;
  width: 100%;
  height: 100%;
}

.step_btn_text {
  width: 90px;
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.step_btn.is-hidden {
  display: none;
}

.step_btn.primary {
  background: transparent;
}

.step_btn:disabled {
  transform: translateY(-50%);
  opacity: 0.2;
  cursor: not-allowed;
}

#prevStep {
  left: 3rem;
}

#nextStep {
  right: 3rem;
}

.selection_summary {
  display: none;
  margin-bottom: 18px;
  padding: 16px 20px;
  text-align: left;
}

.selection_summary.is-visible {
  display: block;
}

.summary_layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.summary_form {
  display: grid;
  gap: 18px;
  background: #f6f6f6;
  padding: 48px 24px;
}

.summary_footer {
  margin-top: 20px;
  border-radius: 12px;
  background: #f1f1f1;
  padding: 16px 20px;
  color: #444;
  font-size: 13px;
}

.summary_footer_text {
  margin: 0;
  line-height: 1.6;
}

body.oq-quote:not(.oq-last-step) footer {
  display: none;
}

.form_field {
  display: grid;
  font-size: 13px;
}

.form_label {
  margin: 0;
  color: var(--accent-ink);
  font-weight: 600;
  line-height: 1;
  padding-bottom: 12px;
}

.summary_form input,
.summary_form textarea {
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 14px 12px;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
}

.form_submit {
  cursor: pointer;
  margin: 0 auto;
  border: none;
  background: #7d7d7d;
  padding: 10px 16px;
  width: 320px;
  height: 60px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.form_submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.form_check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  font-size: 14px;
}

.form_check input {
  width: 16px;
  height: 16px;
}

@media (max-width: 840px) {
  .summary_layout {
    grid-template-columns: 1fr;
  }
}

.summary_ttl {
  margin: 0 0 10px;
  color: var(--accent-ink);
  font-size: 16px;
}

#selectionList {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

#selectionList li {
  margin: 0;
}

.selection_btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  text-align: left;
}

.step_note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
}

.selection_label {
  font-weight: 600;
  font-size: 10px;
}

.selection_thumb {
  display: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.selection_value {
  font-weight: 600;
  font-size: 12px;
  text-align: left;
}

.selection_text {
  display: grid;
  gap: 4px;
}

.relation_area {
  margin-top: 40px;
}

.c-btn,
.build-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.c-btn:hover,
.build-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(184, 107, 61, 0.3);
}

.btn-wr {
  margin-top: 14px;
}

.form_check a {
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .page.online-quote {
    padding: 32px 16px 64px;
  }

  .block_items {
    grid-template-columns: 1fr;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    gap: 8px;
  }

  .block_items_wrap {
    height: auto;
  }

  .scroll_track,
  .scroll_thumb {
    display: none;
  }

  .radio-wr {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 4px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
  }

  .radio-wr label {
    display: contents;
    min-height: 0;
  }

  .radio-wr .item_img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 56px;
    height: 56px;
    aspect-ratio: auto;
  }

  .radio-wr .item_img.no-img .name {
    display: none;
  }

  .radio-wr .item_name {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 14px;
    line-height: 1.4;
  }

  ._price {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  .radio-wr input:checked + label .item_img::after {
    width: 48px;
    height: 48px;
  }

  .price_area {
    padding: 0.8rem 1.6rem;
    font-size: 16px;
  }

  .price_unit {
    font-size: 16px;
  }

  .page_ttl .head {
    font-size: 1.4rem;
  }

  .box_ttl {
    font-size: 16px;
    margin-bottom: 12px;
  }
  #prevStep {
    left: 0.5rem;
  }

  #nextStep {
    right: 0.5rem;
  }
  .step_btn {
    display: flex;
    position: fixed;
    top: 84%;
  }
  .selection_summary {
    padding: 0;
  }

  .summary_form {
    padding: 36px 16px;
  }
  .block.plan .zoom_btn {
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
  }
  .image_modal_close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }

  .image_modal_close::before,
  .image_modal_close::after {
    width: 14px;
  }
}

.summary_only {
  display: none;
}

.summary_only.is-visible {
  display: block;
}
