@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Meiryo", sans-serif;
  color: #333;
  background: #f3f5f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.7;
}

.site-header {
  padding: 14px max(20px, calc((100% - 960px) / 2));
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.brand {
  display: block;
  width: fit-content;
  color: #174b78;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.order-container {
  width: min(100% - 32px, 800px);
  margin: 28px auto;
  padding: 28px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0000000a;
}

.step-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.step {
  padding: 6px 14px;
  color: #777;
  background: #f0f1f2;
  border-radius: 20px;
  font-size: 0.9rem;
}

.step.current {
  color: #fff;
  background: #174b78;
}

h1 {
  margin: 0 0 8px;
  color: #174b78;
  font-size: 1.7rem;
}

.intro {
  margin: 0 0 24px;
}

section {
  margin: 28px 0;
}

section h2 {
  margin: 0 0 12px;
  padding: 8px 12px;
  color: #174b78;
  background: #eef4f8;
  font-size: 1.15rem;
}

.field {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 12px 8px;
  border-bottom: 1px solid #e6e6e6;
}

fieldset.field {
  border-right: 0;
  border-left: 0;
}

.field label,
.field legend {
  font-weight: 600;
}

.field-label {
  font-weight: 600;
}

.product-choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 12px;
}

.field-hint {
  margin: 8px 0;
  color: #666;
}

.postal-code-status {
  grid-column: 2;
  margin: -4px 0 0;
}

.postal-code-status:empty {
  display: none;
}

.denomination-group {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #cbd4dc;
  border-radius: 5px;
}

.denomination-group legend {
  padding: 0 6px;
  color: #174b78;
  font-weight: 700;
}

.denomination-options {
  display: grid;
  gap: 8px;
}

.denomination-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.7fr);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e6e6e6;
}

.denomination-row:last-child {
  border-bottom: 0;
}

.denomination-row .choice {
  grid-column: 1;
}

.denomination-row > .design-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 8px;
  background: #f7f9fa;
}

.denomination-row > .design-options[hidden] {
  display: none;
}

.design-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
}

.design-option .choice {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.design-option img {
  width: 96px;
  height: 66px;
  object-fit: contain;
  background: #fff;
}

.design-option .input-with-unit {
  min-width: 0;
  gap: 5px;
}

.design-option input[type="number"] {
  width: 76px;
}

.denomination-row input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #b9c1c8;
  border-radius: 4px;
  font: inherit;
}

.product-option-section {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #d5dde3;
}

.product-option-section h3 {
  margin: 0 0 10px;
  color: #174b78;
  font-size: 1rem;
}

.option-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.image-choice,
.service-option-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background: #fff;
}

.service-option-card {
  height: 100%;
}

.image-choice {
  cursor: pointer;
}

.image-choice img,
.service-option-card > img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
}

.image-choice input,
.option-yes-no input {
  width: 18px;
  height: 18px;
  margin: 0 5px 0 0;
  vertical-align: middle;
}

.service-option-name {
  font-weight: 600;
}

.option-yes-no {
  display: flex;
  width: 100%;
  flex: 1;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.option-yes-no .choice {
  margin: 0;
}

.image-choice .option-control-label {
  margin: 0;
}

.option-quantity,
.service-option-card .option-quantity {
  width: 100%;
}

.option-quantity input {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #b9c1c8;
  border-radius: 4px;
  font: inherit;
}

.option-details {
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.7fr);
  margin-top: 12px;
  padding: 8px 0 0;
  border-bottom: 0;
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #b9c1c8;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #7aa9cd;
  outline-offset: 1px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0;
  font-weight: normal;
}

.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
}

fieldset.field .choice {
  grid-column: 2;
}

fieldset.field legend {
  float: left;
  width: calc(100% * 0.8 / 2.5);
}

fieldset.field legend + .choice {
  grid-column: 2;
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-with-unit input {
  max-width: 220px;
}

.required-mark {
  color: #c62828;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 24px;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: #174b78;
}

.primary-button:hover {
  background: #103958;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  color: #174b78;
  background: #e8edf1;
}

.message {
  margin: 16px 0;
  padding: 12px 14px;
  background: #eef4f8;
  border-radius: 4px;
}

.message.error {
  color: #8c1d18;
  background: #fff0ef;
}

.summary-list {
  margin: 24px 0;
  border-top: 1px solid #ddd;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.7fr);
  gap: 12px;
  margin: 0;
  padding: 12px 8px;
  border-bottom: 1px solid #ddd;
}

.summary-row dt {
  font-weight: 700;
}

.summary-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.complete-message {
  margin-top: 28px;
  padding: 20px;
  text-align: center;
  background: #eef7ef;
}

.complete-message h2 {
  color: #27623a;
}

.site-footer {
  padding: 18px;
  color: #666;
  text-align: center;
  font-size: 0.85rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .order-container {
    width: calc(100% - 20px);
    margin: 12px auto;
    padding: 18px 14px;
  }

  .field,
  .summary-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .postal-code-status {
    grid-column: 1;
  }

  fieldset.field .choice {
    grid-column: 1;
  }

  fieldset.field legend {
    float: none;
    width: auto;
  }

  .denomination-row {
    grid-template-columns: 1fr minmax(110px, 0.8fr);
    gap: 8px;
  }

  .denomination-row > .design-options {
    grid-template-columns: 1fr;
  }

  .option-details {
    grid-template-columns: 1fr;
  }
}
