/* ===== Base ===== */
html,
body {
  font-weight: 500;
  font-size: 17px;
  color: var(--color-text);
  line-height: 1.85;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Layout ===== */
.wrapper {
  max-width: 480px;
  width: 100%;
  padding: 16px 16px 40px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

form > input[type="hidden"] {
  display: none;
}

/* ===== Card Base ===== */
.bank-flow {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
}

/* ===== Headings ===== */
h2,
h2.title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===== Links ===== */
a {
  text-decoration: underline;
}

.search-zip-link {
  text-decoration: none;
  font-size: 11px;
  color: var(--color-link);
  transition: opacity 0.2s;
}

/* ===== Labels ===== */
label {
  display: block;
}

.txt-bold {
  font-weight: 700;
}

.label-font {
  color: var(--color-text);
  font-size: 17px;
  font-weight: 700;
}

/* ===== Inputs & Select (base) ===== */
input,
select {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  font-size: 17px;
  font-weight: 500;
  background: var(--color-bg-card);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-alpha-10);
}

/* Width overrides */
input.zip-input   { width: 42%; }
.address          { width: 45%; }
#email            { width: 100%; }
#tel              { width: 75%; }

input#consent_check {
  width: 18px;
  display: inline;
  padding: 0;
}

select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

::placeholder {
  opacity: 0.35;
}

/* ===== Address Wrapper ===== */
.address-wrap {
  padding-left: 0;
  width: 100%;
}

.multi-input-column {
  display: flex;
  justify-content: space-between;
}

#cart-order-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-group {
  display: flex;
  flex-direction: column;
}

.notice a {
  text-decoration: underline;
}

.notice,
.notice * {
  font-size: 10px;
}

.cart-order-total-price {
  color: var(--color-primary);
}

.cart-order-total--grand {
  font-size: 18px;
}

.cart-order-total--grand .cart-order-total-label {
  color: var(--color-primary);
}

/* ===== Bank Flow Steps ===== */
.bank-flow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-flow p {
  color: var(--color-text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  padding-left: 4px;
}

/* ===== Confirm Notice ===== */
div.confirm-notice p {
  color: var(--color-error);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  padding: 10px 14px;
  background: var(--color-bg-error);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-error-strong);
}

/* ===== Error Messages ===== */
.error-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.err-msg {
  color: var(--color-error);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  padding: 8px 14px;
  background: var(--color-bg-error);
  border-radius: var(--radius-md);
}


/* ===== Re-input Link ===== */
.re-input-link {
  display: block;
  width: fit-content;
  align-self: center;
  white-space: nowrap;
}

/* ===== Page Overrides ===== */
.mail_attention p {
  color: var(--color-text);
}

/* ===== Gray-out (Confirm screen) ===== */
.gray-out-input * input,
.gray-out-input * select {
  background-color: var(--color-bg-muted);
  outline: none;
  pointer-events: none;
  border-color: var(--color-border-soft);
}

.form-hint-link {
  display: inline-block;
  font-size: 12px;
  color: var(--color-link);
  text-decoration: underline;
}

.form-hint-link:hover {
  opacity: 0.75;
}

/* Invalid input highlight (blur時 or POST後) */
input.touched:invalid,
select.touched:invalid,
.validated input:invalid,
.validated select:invalid {
  border-color: var(--color-error);
  background-color: var(--color-bg-error);
}

/* Inline field error */
.field-error {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-error);
  line-height: 1.4;
}

.field-error[hidden] {
  display: none;
}

/* ===== Responsive: narrow phones ===== */
@media (max-width: 360px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .form-row .form-group {
    padding-bottom: 16px;
  }
  .form-row .form-group:last-child {
    padding-bottom: 0;
  }
  .form-group--zip {
    flex: none;
    width: 60%;
  }
  .form-group--pref {
    flex: none;
    width: 55%;
  }
}

/* ===== View Transition ===== */
@view-transition {
  navigation: auto;
}
