.modern-checkout,
.modern-complete {
  min-height: 100vh;
  color: #332b21;
  background:
    radial-gradient(circle at 8% 2%, rgba(255,255,255,.98), transparent 28%),
    linear-gradient(180deg, #fbf7f0 0%, #f1e4d1 100%);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
}

.modern-checkout *,
.modern-complete * { box-sizing: border-box; }
.modern-checkout-container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.modern-checkout__header { display: flex; width: min(1120px, calc(100% - 40px)); min-height: 78px; margin-inline: auto; align-items: center; justify-content: space-between; }
.modern-checkout__header p { margin: 0; color: #76541f; font-family: Georgia, serif; font-size: 11px; letter-spacing: .18em; }
.modern-checkout__logo { display: block; width: 180px; }
.modern-checkout__logo svg { display: block; width: 100%; height: auto; }
.modern-checkout__logo .cls-1 { fill: #76541f; }
.modern-checkout__hero { padding: 52px 0 46px; border-top: 1px solid rgba(118,84,31,.13); border-bottom: 1px solid rgba(118,84,31,.13); background: rgba(255,253,248,.68); text-align: center; }
.modern-checkout__eyebrow { margin: 0 0 8px; color: #76541f; font-family: Georgia, serif; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.modern-checkout__hero h1 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif; font-size: clamp(32px,5vw,52px); font-weight: 500; }
.modern-checkout__hero p:last-child { margin: 12px 0 0; color: #756b5f; font-size: 14px; }
.modern-checkout__layout { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 30px; align-items: start; padding-block: 52px 90px; }
.modern-checkout-form { min-width: 0; }
.modern-checkout__honeypot { position: absolute; left: -9999px; }
.modern-checkout-alert { margin-bottom: 22px; padding: 18px 20px; border: 1px solid rgba(186,47,40,.22); border-radius: 16px; color: #8d2924; background: #fff4f2; }
.modern-checkout-alert strong { display: block; margin-bottom: 6px; }
.modern-checkout-alert ul { margin: 0; padding-left: 20px; font-size: 13px; }
.modern-checkout-card { margin-bottom: 24px; padding: 30px; border: 1px solid rgba(118,84,31,.15); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: 0 18px 52px rgba(74,48,15,.08); }
.modern-checkout-card__head { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid rgba(118,84,31,.13); }
.modern-checkout-card__head > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#835d26,#c5a15a); font-family: Georgia,serif; font-size: 12px; }
.modern-checkout-card__head h2 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif; font-size: 23px; }
.modern-checkout-card__head p { margin: 3px 0 0; color: #756b5f; font-size: 12px; }
.modern-checkout-card__head p b, .modern-checkout-field span b { color: #bb3c34; }
.modern-checkout-product { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; }
.modern-checkout-product img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: 18px; background: #f1e6d6; }
.modern-checkout-product h3 { margin: 0 0 8px; font-size: 17px; }
.modern-checkout-product__regular { display: inline-block; position: relative; margin: 0 0 5px; color: #817566; font-size: 12px; }
.modern-checkout-product__regular::after { position: absolute; top: 50%; left: 0; width: 100%; height: 2px; content: ""; background: #d64840; }
.modern-checkout-product__price { margin: 0 0 15px; color: #76541f; font-family: Georgia,serif; font-size: 31px; font-weight: 700; }
.modern-checkout-product__price small { color: #756b5f; font-family: sans-serif; font-size: 11px; font-weight: 400; }
.modern-checkout-quantity { display: flex; gap: 10px; align-items: center; color: #756b5f; font-size: 13px; }
.modern-checkout-quantity select { width: 86px; min-height: 42px; padding: 8px 30px 8px 12px; border: 1px solid rgba(118,84,31,.24); border-radius: 10px; color: #332b21; background: #fff; }
.modern-checkout-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.modern-checkout-field { display: flex; grid-column: 1/-1; min-width: 0; flex-direction: column; gap: 7px; }
.modern-checkout-field--half { grid-column: span 1; }
.modern-checkout-field > span { font-size: 13px; font-weight: 700; }
.modern-checkout-field input, .modern-checkout-field select, .modern-checkout-field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid rgba(118,84,31,.22); border-radius: 12px; color: #332b21; background: #fff; font: inherit; font-size: 15px; outline: none; transition: border-color .2s,box-shadow .2s; }
.modern-checkout-field textarea { min-height: 100px; resize: vertical; }
.modern-checkout-field input:focus, .modern-checkout-field select:focus, .modern-checkout-field textarea:focus { border-color: #b08a45; box-shadow: 0 0 0 3px rgba(176,138,69,.12); }

.modern-postal-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.modern-postal-search__button { min-height: 50px; padding: 10px 15px; border: 1px solid rgba(118,84,31,.27); border-radius: 12px; color: #76541f; background: #fff8eb; font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background-color .2s,border-color .2s,opacity .2s; }
.modern-postal-search__button:hover { border-color: #b08a45; background: #f7ead2; }
.modern-postal-search__button:disabled { opacity: .55; cursor: wait; }
.modern-postal-search__status { display: block; min-height: 1.5em; color: #756b5f; font-size: 10px; line-height: 1.5; }
.modern-postal-search__status[data-state="loading"] { color: #76541f; }
.modern-postal-search__status[data-state="success"] { color: #26703d; }
.modern-postal-search__status[data-state="error"] { color: #b32d2e; }
.modern-payment-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.modern-payment-option { position: relative; display: grid; min-width: 0; padding: 19px; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; border: 1px solid rgba(118,84,31,.2); border-radius: 16px; background: #fff; cursor: pointer; }
.modern-payment-option:has(input:checked) { border-color: #b08a45; background: #fffaf0; box-shadow: 0 0 0 3px rgba(176,138,69,.1); }
.modern-payment-option input { position: absolute; opacity: 0; }
.modern-payment-option__check { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #b9a98e; border-radius: 50%; background: #fff; }
.modern-payment-option input:checked + .modern-payment-option__check::after { width: 12px; height: 12px; border-radius: 50%; content: ""; background: #a77b35; }
.modern-payment-option strong, .modern-payment-option small, .modern-payment-option em { display: block; }
.modern-payment-option strong { margin-bottom: 4px; font-size: 15px; }
.modern-payment-option small { color: #756b5f; font-size: 11px; line-height: 1.6; }
.modern-payment-option em { margin-top: 6px; color: #b33c34; font-size: 10px; font-style: normal; }
.modern-payment-note { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: #f6eddf; }
.modern-payment-note strong { color: #76541f; font-size: 13px; }
.modern-payment-note p { margin: 5px 0 0; color: #756b5f; font-size: 12px; }
.modern-checkout-agree { display: flex; gap: 10px; align-items: flex-start; margin: 22px 4px 14px; font-size: 12px; line-height: 1.7; }
.modern-checkout-agree input { margin-top: 4px; }
.modern-checkout-agree a { color: #76541f; text-decoration: underline; }
.modern-checkout-submit { display: flex; width: 100%; min-height: 68px; padding: 14px 22px; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#76501d 0%,#c5a45f 50%,#76501d 100%); box-shadow: 0 18px 44px rgba(111,72,20,.25); cursor: pointer; }
.modern-checkout-submit span { font-size: 16px; font-weight: 800; }
.modern-checkout-submit small { margin-top: 3px; color: rgba(255,255,255,.78); font-size: 10px; }
.modern-checkout-submit:disabled { opacity: .65; cursor: wait; }
.modern-checkout-secure { margin: 12px 0 0; color: #756b5f; font-size: 11px; text-align: center; }
.modern-order-summary { position: sticky; top: 24px; overflow: hidden; padding: 24px; border: 1px solid rgba(118,84,31,.16); border-radius: 24px; background: rgba(255,253,248,.96); box-shadow: 0 22px 64px rgba(74,48,15,.12); }
.admin-bar .modern-order-summary { top: 56px; }
.modern-order-summary h2 { margin: 0 0 18px; font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif; font-size: 22px; }
.modern-order-summary__product { display: grid; grid-template-columns: 82px 1fr; gap: 13px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid rgba(118,84,31,.13); }
.modern-order-summary__product img { width: 82px; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: #eee1cf; }
.modern-order-summary__product strong, .modern-order-summary__product small { display: block; }
.modern-order-summary__product strong { font-size: 13px; line-height: 1.55; }
.modern-order-summary__product small { margin-top: 3px; color: #756b5f; font-size: 10px; }
.modern-order-summary dl { margin: 15px 0; }
.modern-order-summary dl div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; font-size: 12px; }
.modern-order-summary dt { color: #756b5f; }
.modern-order-summary dd { margin: 0; font-weight: 700; }
.modern-order-summary__total { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 16px 0; border-top: 1px solid rgba(118,84,31,.18); border-bottom: 1px solid rgba(118,84,31,.18); }
.modern-order-summary__total span { width: 100%; color: #756b5f; font-size: 12px; text-align: right; }
.modern-order-summary__total strong { color: #76541f; font-family: Georgia,serif; font-size: 34px; }
.modern-order-summary__total small { color: #756b5f; font-size: 10px; }
.modern-order-summary ul { margin: 16px 0 0; padding: 0; list-style: none; color: #756b5f; font-size: 11px; }
.modern-order-summary li + li { margin-top: 6px; }

.modern-complete { display: grid; min-height: 100vh; padding: 44px 20px 80px; place-items: start center; }
.modern-complete__logo { width: min(230px,70vw); margin-bottom: 28px; }
.modern-complete__logo svg { display: block; width: 100%; height: auto; }
.modern-complete__logo .cls-1 { fill: #76541f; }
.modern-complete-card { width: min(720px,100%); padding: clamp(30px,5vw,58px); border: 1px solid rgba(118,84,31,.16); border-radius: 28px; background: rgba(255,253,248,.96); box-shadow: 0 24px 70px rgba(74,48,15,.12); text-align: center; }
.modern-complete-card__icon { display: grid; width: 72px; height: 72px; margin: 0 auto 20px; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#875f25,#c5a15a); font-size: 30px; }
.modern-complete-card__eyebrow { margin: 0 0 8px; color: #76541f; font-family: Georgia,serif; font-size: 11px; letter-spacing: .18em; }
.modern-complete-card h1 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia,serif; font-size: clamp(28px,5vw,42px); }
.modern-complete-card > p { color: #756b5f; font-size: 14px; }
.modern-complete-order { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 28px 0; }
.modern-complete-order div { padding: 15px 10px; border-radius: 14px; background: #f4e9d8; }
.modern-complete-order span, .modern-complete-order strong { display: block; }
.modern-complete-order span { color: #756b5f; font-size: 10px; }
.modern-complete-order strong { margin-top: 5px; font-size: 13px; }
.modern-bank-info { margin: 24px 0; padding: 22px; border: 1px dashed rgba(176,138,69,.45); border-radius: 18px; background: #fffaf0; text-align: left; }
.modern-bank-info h2 { margin: 0 0 12px; color: #76541f; font-size: 18px; }
.modern-bank-info dl { margin: 0; }
.modern-bank-info dl div { display: grid; grid-template-columns: 100px 1fr; padding: 8px 0; border-bottom: 1px solid rgba(118,84,31,.1); font-size: 13px; }
.modern-bank-info dt { color: #756b5f; }
.modern-bank-info dd { margin: 0; font-weight: 700; }
.modern-bank-info p { margin: 14px 0 0; color: #756b5f; font-size: 12px; }
.modern-complete-card__mail { margin-top: 16px; }
.modern-complete-card > a { display: inline-flex; min-height: 52px; margin-top: 15px; padding: 12px 28px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#76501d,#c5a15a); text-decoration: none; }

@media (max-width: 900px) {
  .modern-checkout__layout { grid-template-columns: 1fr; }
  .modern-order-summary { position: static; order: -1; }
}

@media (max-width: 640px) {
  .modern-checkout-container, .modern-checkout__header { width: calc(100% - 24px); }
  .modern-checkout__header { min-height: 66px; }
  .modern-checkout__logo { width: 145px; }
  .modern-checkout__hero { padding: 38px 0 34px; }
  .modern-checkout__layout { padding-block: 28px 70px; }
  .modern-checkout-card { padding: 21px 16px; border-radius: 19px; }
  .modern-checkout-card__head h2 { font-size: 20px; }
  .modern-checkout-product { grid-template-columns: 110px 1fr; gap: 14px; }
  .modern-checkout-product__price { font-size: 26px; }
  .modern-checkout-fields, .modern-payment-options { grid-template-columns: 1fr; }
  .modern-checkout-field--half { grid-column: 1/-1; }
  .modern-postal-search { grid-template-columns: 1fr; }
  .modern-postal-search__button { width: 100%; min-height: 46px; }
  .modern-payment-option { padding: 16px; }
  .modern-order-summary { padding: 20px 17px; border-radius: 20px; }
  .modern-complete-order { grid-template-columns: 1fr; }
  .modern-bank-info dl div { grid-template-columns: 82px 1fr; }
}


/* v1.1.1: inventory, delivery and confirmation */
.modern-checkout-product__stock { display: inline-flex; margin: 8px 0 0; padding: 5px 10px; border-radius: 999px; color: #b32d2e; background: rgba(179,45,46,.09); font-size: 11px; font-weight: 800; }
.modern-shipping-method { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid rgba(118,84,31,.18); border-radius: 16px; background: #fffaf1; }
.modern-shipping-method > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.modern-shipping-method > div > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#8a642d,#c4a15c); }
.modern-shipping-method p { margin: 0; }
.modern-shipping-method strong, .modern-shipping-method small { display: block; }
.modern-shipping-method strong { font-size: 14px; }
.modern-shipping-method small { margin-top: 3px; color: #756b5f; font-size: 11px; }
.modern-shipping-method > b { flex: 0 0 auto; color: #76541f; font-size: 14px; }
.modern-payment-option.is-unconfigured { opacity: .58; cursor: not-allowed; }
.modern-checkout-confirm { border-color: rgba(176,138,69,.38); background: linear-gradient(180deg,#fffdf8,#fff8e9); }
.modern-confirm-list { margin: 0; }
.modern-confirm-list > div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(118,84,31,.12); }
.modern-confirm-list dt { color: #756b5f; font-size: 12px; }
.modern-confirm-list dd { margin: 0; color: #332b21; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.modern-confirm-edit { display: inline-flex; min-height: 44px; margin-top: 18px; padding: 10px 20px; align-items: center; justify-content: center; border: 1px solid rgba(118,84,31,.3); border-radius: 999px; color: #76541f; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.modern-checkout-soldout { width: min(680px,calc(100% - 24px)); margin: 54px auto 100px; padding: clamp(34px,6vw,64px); border: 1px solid rgba(118,84,31,.16); border-radius: 28px; background: rgba(255,253,248,.96); box-shadow: 0 24px 70px rgba(74,48,15,.12); text-align: center; }
.modern-checkout-soldout__icon { display: grid; width: 72px; height: 72px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#7d6a55,#a38d70); font-size: 34px; }
.modern-checkout-soldout h2 { margin: 0; font-family: "Yu Mincho","Hiragino Mincho ProN",Georgia,serif; font-size: clamp(28px,5vw,42px); }
.modern-checkout-soldout > p:not(.modern-checkout__eyebrow) { color: #756b5f; font-size: 14px; }
.modern-checkout-soldout a { display: inline-flex; min-height: 52px; margin-top: 18px; padding: 12px 28px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#76501d,#c5a15a); text-decoration: none; }

@media (max-width: 640px) {
  .modern-shipping-method { align-items: flex-start; flex-direction: column; }
  .modern-confirm-list > div { grid-template-columns: 1fr; gap: 4px; }
  .modern-checkout-soldout { margin-top: 30px; }
}


/* Order correction page */
.modern-order-edit {
  min-height: 100vh;
  padding: 54px 18px 80px;
  background: linear-gradient(180deg, #fbf7ef 0%, #f4ebdc 100%);
}

.modern-order-edit__inner {
  width: min(860px, 100%);
  margin: 0 auto;
}

.modern-order-edit__header {
  margin-bottom: 26px;
  text-align: center;
}

.modern-order-edit__header .modern-checkout__logo {
  display: block;
  width: min(260px, 72vw);
  margin: 0 auto 18px;
}

.modern-order-edit__header h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.45;
}

.modern-order-edit__header p {
  margin: 12px 0 0;
  color: #756b60;
}

.modern-order-edit__notice {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #b8d8bd;
  border-radius: 14px;
  color: #1e6a31;
  background: #f1fff3;
}

.modern-order-edit__locked {
  padding: 38px 28px;
  border: 1px solid rgba(170,125,50,.2);
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 52px rgba(80,54,19,.1);
}

.modern-order-edit__locked h2 {
  margin: 0 0 12px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
}

.modern-order-edit__locked a,
.modern-order-edit__back {
  display: inline-flex;
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: #77511d;
  text-decoration: none;
}

.modern-kana-help {
  display: block;
  margin-top: 7px;
  color: #8a7760;
  font-size: 12px;
}

.modern-complete-card__edit-link {
  display: inline-flex;
  margin: 12px 6px 0;
  padding: 12px 20px;
  border: 1px solid rgba(142,98,35,.28);
  border-radius: 999px;
  color: #744d16;
  background: #fffaf0;
  text-decoration: none;
}

@media (max-width: 640px) {
  .modern-order-edit {
    padding: 34px 12px 64px;
  }

  .modern-order-edit__locked {
    padding: 28px 18px;
  }
}
