:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --paper: #fffdf8;
  --ink: #231f1b;
  --muted: #655d54;
  --line: #d9cfc2;
  --accent: #b7352d;
  --accent-dark: #8f241e;
  --leaf: #3f6d4e;
  --soft: #f1e5d8;
  --warning: #fff2d1;
  --shadow: 0 18px 48px rgba(58, 42, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  background: linear-gradient(rgba(61, 41, 27, 0.26), rgba(61, 41, 27, 0.42)), url("images/apple-box.webp") center 48% / cover;
  color: #fff;
}

.site-header__inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0;
}

.site-label {
  align-items: center;
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
}

.site-label img {
  flex: 0 0 auto;
  height: clamp(42px, 8vw, 72px);
  width: clamp(42px, 8vw, 72px);
  object-fit: contain;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

h3 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

h4 {
  margin-bottom: 0;
  font-size: 1rem;
}

.page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.notice,
.form-section,
.summary-panel,
.review-panel,
.completion-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}

.notice {
  border-left: 6px solid var(--accent);
}

.notice ul {
  margin: 0;
  padding-left: 1.35rem;
}

.section-heading {
  margin-bottom: 20px;
}

.order-note-field + .order-note-field {
  margin-top: 18px;
}

.order-note-field h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.order-note-field h3 label {
  display: block;
  margin: 0;
}

.order-note-field h3 .optional-label {
  display: inline;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0;
}

.order-note-field p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 8px;
}

#referralSource {
  min-height: 48px;
}

#referralSource::placeholder {
  color: #777;
  opacity: 1;
}

@media (max-width: 600px) {
  #referralSource {
    min-height: 76px;
  }
}

.section-heading p {
  color: var(--muted);
  margin-bottom: 0;
}

.with-action,
.card-heading,
.items-heading,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

label .name-with-honorific {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 400;
}

.name-with-honorific input {
  flex: 1;
  min-width: 0;
}

label .name-with-honorific > span {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 400;
}

b {
  color: var(--accent);
  font-size: 0.78rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c9bdae;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--leaf);
  outline: 3px solid rgba(63, 109, 78, 0.18);
}

input:disabled {
  background: #eee8df;
  color: #8a8177;
  cursor: not-allowed;
}

input[readonly] {
  background: #f3eee7;
  color: var(--muted);
  cursor: default;
}

.wide {
  grid-column: 1 / -1;
}

.product-load-notice {
  margin: 0 0 16px;
}

.product-load-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-load-notice p[data-state="error"],
.product-load-notice p[data-state="empty"] {
  color: var(--accent-dark);
}

.product-load-notice button {
  margin-top: 8px;
}

.address-details {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(170px, 0.85fr) minmax(240px, 1.15fr);
  gap: 16px;
}

.destination-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  padding: 18px;
  margin-bottom: 18px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 18px;
  font-weight: 700;
}

.check-row input {
  width: 20px;
  min-height: 20px;
}

.check-row span {
  margin: 0;
}

.items-heading {
  margin: 22px 0 12px;
}

.section-bottom-action,
.card-bottom-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.destination-fields.is-disabled {
  opacity: 0.72;
}

.delivery-time-guide {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.delivery-time-guide h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.delivery-time-guide p {
  color: var(--muted);
  margin-bottom: 10px;
}

.delivery-time-table {
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 430px;
  text-align: center;
  width: 100%;
}

.delivery-time-table th,
.delivery-time-table td {
  border: 1px solid var(--line);
  font-weight: 400;
  padding: 7px 10px;
}

.delivery-time-table th {
  background: transparent;
}

.item-row {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.item-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.item-heading h5 {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.item-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(100px, 0.7fr) minmax(180px, 1.4fr);
  gap: 12px;
  align-items: end;
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  padding: 13px 22px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  background: #9a9288;
  cursor: not-allowed;
}

.submit-controls {
  align-items: center;
  display: flex;
  gap: 16px;
}

.back-link {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link:hover {
  color: var(--accent-dark);
}

.secondary-button {
  background: var(--leaf);
  color: #fff;
  padding: 9px 14px;
}

.danger-button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 12px;
}

.danger-button:hover {
  background: #fff0ed;
}

.text-button {
  background: transparent;
  color: var(--accent);
  padding: 8px;
}

.summary {
  color: var(--muted);
}

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

.summary ul {
  margin: 6px 0 14px;
  padding-left: 1.2rem;
}

#formMessage,
#reviewMessage {
  margin: 0;
  color: var(--muted);
}

#formMessage.error,
#reviewMessage.error {
  color: var(--accent-dark);
  font-weight: 700;
}

#formMessage.success,
#reviewMessage.success {
  color: var(--leaf);
  font-weight: 700;
}

.review-summary {
  display: grid;
  gap: 22px;
}

.review-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.review-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.review-destination {
  margin-left: 18px;
}

.review-block h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.review-block h4 {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 18px 0 8px;
}

.review-destination h4 {
  margin-left: 28px;
}

.review-details {
  display: grid;
  gap: 8px;
  margin: 0 0 0 14px;
}

.review-details div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 12px;
}

.review-details dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.review-details dd {
  color: var(--ink);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.review-same-address,
.review-empty {
  color: var(--muted);
  margin-bottom: 12px;
}

.review-item-list {
  list-style: none;
  margin: 0 0 0 28px;
  padding: 0;
}

.review-item-list li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.review-item-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.review-item-main {
  align-items: baseline;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.review-item-price,
.review-note,
.review-order-note {
  color: var(--muted);
}

.review-item-price {
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

.review-note,
.review-order-note {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.completion-panel h2 {
  color: var(--leaf);
}

.hidden-frame {
  display: none;
}

@media (max-width: 760px) {
  .site-header__inner {
    min-height: 300px;
  }

  .notice,
  .form-section,
  .summary-panel,
  .review-panel,
  .completion-panel {
    padding: 18px;
  }

  .field-grid,
  .item-fields,
  .review-details div,
  .address-details {
    grid-template-columns: 1fr;
  }

  .wide,
  .address-details {
    grid-column: auto;
  }

  .review-destination {
    margin-left: 12px;
  }

  .review-details {
    margin-left: 10px;
  }

  .review-item-list {
    margin-left: 20px;
  }

  .review-destination h4 {
    margin-left: 20px;
  }

  .with-action,
  .items-heading,
  .form-actions,
  .submit-controls,
  .section-bottom-action,
  .card-bottom-action {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .danger-button--compact {
    width: auto;
  }

  .submit-controls {
    flex-direction: column-reverse;
  }

}

/* 商品・価格・ご注文案内ページ */
.guide-page .site-header__inner {
  min-height: 300px;
}

.guide-section {
  scroll-margin-top: 20px;
}

.guide-status {
  color: var(--muted);
}

.guide-cultivar-list {
  display: grid;
  gap: 16px;
}

.guide-cultivar-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf1;
  box-shadow: 0 10px 26px rgba(58, 42, 24, 0.08);
  padding: 20px;
}

.guide-cultivar-card__top {
  align-items: start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.guide-cultivar-card h3 {
  color: var(--leaf);
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 0;
}

.guide-cultivar-card__period {
  border-left: 1px solid var(--line);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  padding-left: 18px;
  text-align: right;
}

.guide-cultivar-card__period span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
}

.guide-cultivar-card__method {
  color: var(--leaf);
  font-size: 0.88rem;
  font-weight: 700;
  margin: 12px 0 0;
}

.guide-cultivar-card__prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.guide-cultivar-card__price {
  border-left: 1px solid var(--line);
  padding: 2px 14px 3px;
}

.guide-cultivar-card__price:first-child {
  border-left: 0;
  padding-left: 0;
}

.guide-cultivar-card__weight,
.guide-cultivar-card__price strong {
  display: block;
}

.guide-cultivar-card__weight {
  font-weight: 700;
}

.guide-cultivar-card__weight small {
  color: var(--muted);
  display: inline;
  font-size: 0.77rem;
  font-weight: 500;
}

.guide-cultivar-card__price strong {
  color: var(--accent-dark);
  font-size: 1.12rem;
  margin-top: 4px;
  white-space: nowrap;
}

.guide-cultivar-card__price.is-unavailable strong {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 7px;
}

.guide-cultivar-card__note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  margin: 14px 0 0;
  padding-top: 10px;
}

.guide-common-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 20px;
  padding-top: 16px;
}

.guide-common-note p {
  margin: 0;
}

.guide-common-note p + p {
  margin-top: 5px;
}

.guide-product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-product {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf1;
  padding: 18px;
}

.guide-product h3 {
  margin-bottom: 8px;
}

.guide-product-price {
  color: var(--accent-dark);
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 0;
}

.guide-product-update {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.guide-product-note,
.guide-subsection > p,
.guide-contact-note {
  color: var(--muted);
  margin: 18px 0 0;
}

.guide-table-wrap {
  overflow-x: auto;
}

.guide-table-wrap--small {
  max-width: 620px;
}

.guide-cool-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-cool-table th,
.guide-cool-table td {
  border: 1px solid var(--line);
  padding: 8px 4px;
  text-align: center;
}

.guide-cool-table thead th {
  background: var(--soft);
}

.guide-cool-table tbody th {
  background: #fffaf1;
}

.guide-payment-note {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  line-height: 1.5;
}

.guide-table {
  border-collapse: collapse;
  min-width: 700px;
  width: 100%;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.guide-table thead th {
  background: var(--soft);
  text-align: center;
}

.guide-table thead small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.guide-table tbody th {
  background: #fffaf1;
  text-align: left;
}

.guide-table td {
  text-align: right;
  white-space: nowrap;
}

.guide-list {
  margin: 18px 0 0;
  padding-left: 1.35rem;
}

.guide-list li + li {
  margin-top: 7px;
}

.guide-subsection {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 22px;
}

.guide-subsection h3 {
  margin-bottom: 4px;
}

.guide-emphasis {
  border-left: 5px solid var(--accent);
  background: var(--warning);
  font-weight: 700;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.guide-payment-list {
  border-top: 1px solid var(--line);
  margin: 0;
}

.guide-payment-list > div {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 180px 1fr;
}

.guide-payment-list dt,
.guide-payment-list dd {
  margin: 0;
  padding: 15px;
}

.guide-payment-list dt {
  background: #fffaf1;
  font-weight: 700;
}

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

.guide-contact-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.guide-contact-grid h3 {
  color: var(--leaf);
  margin-bottom: 8px;
}

.guide-contact-grid p {
  margin-bottom: 0;
}

.guide-order-panel {
  text-align: center;
}

.guide-order-panel p {
  color: var(--muted);
}

.guide-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  min-height: 50px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .guide-cultivar-card {
    padding: 18px;
  }

  .guide-cultivar-card__top {
    display: block;
  }

  .guide-cultivar-card__period {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding: 10px 0 0;
    text-align: left;
  }

  .guide-cultivar-card__prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }

  .guide-cultivar-card__price:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .guide-product-list,
  .guide-contact-grid {
    grid-template-columns: 1fr;
  }

  .guide-payment-list > div {
    grid-template-columns: 1fr;
  }

  .guide-payment-list dt,
  .guide-payment-list dd {
    padding: 12px;
  }

  .guide-payment-list dd {
    padding-top: 0;
  }

  .guide-table {
    min-width: 0;
  }

  .guide-table thead {
    display: none;
  }

  .guide-table,
  .guide-table tbody,
  .guide-table tr,
  .guide-table th,
  .guide-table td {
    display: block;
    width: 100%;
  }

  .guide-table tr {
    border: 1px solid var(--line);
    margin-bottom: 12px;
  }

  .guide-table th,
  .guide-table td {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .guide-table tbody th {
    background: var(--soft);
  }

  .guide-table td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    text-align: right;
  }

  .guide-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-weight: 500;
    text-align: left;
  }

  .guide-table td:last-child {
    border-bottom: 0;
  }
}
