.twt-purchase-form {
  --twt-orange: #e95004;
  --twt-cream: #fff4dc;
  --twt-ink: #333;
  box-sizing: border-box;
  max-width: 880px;
  margin: 40px auto 64px;
  color: var(--twt-ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
.twt-purchase-form *, .twt-purchase-form *::before, .twt-purchase-form *::after { box-sizing: border-box; }
.twt-purchase-form p { margin: 0; }
.twt-purchase-form .twt-form-intro { max-width: 600px; margin: 0 auto 40px; text-align: center; font-weight: 500; }
.twt-purchase-form fieldset {
  min-width: 0;
  margin: 0 0 40px;
  padding: 28px 36px 36px;
  border: 3px solid var(--twt-orange);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 0 rgba(204, 126, 0, .08);
}
.twt-purchase-form legend {
  float: none;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 7px 36px;
  border-radius: 40px;
  background: var(--twt-orange);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: .06em;
}
.twt-purchase-form fieldset > p + p,
.twt-purchase-form fieldset > .twt-kit-fields,
.twt-purchase-form .twt-kit-fields + p { margin-top: 24px; }
.twt-purchase-form label { display: block; color: var(--twt-ink); font-weight: 700; line-height: 1.7; }
.twt-purchase-form .twt-required,
.twt-purchase-form .twt-optional {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}
.twt-purchase-form .twt-required { background: #bc3c00; color: #fff; }
.twt-purchase-form .twt-optional { background: #eeebe6; color: #625b51; }
.twt-purchase-form .wpcf7-form-control-wrap { display: block; margin-top: 10px; }
.twt-purchase-form input:not([type="submit"]):not([type="checkbox"]),
.twt-purchase-form select,
.twt-purchase-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d5cec3;
  border-radius: 8px;
  background: #faf9f6;
  color: var(--twt-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  box-shadow: inset 0 2px 3px rgba(63, 41, 12, .025);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.twt-purchase-form select { cursor: pointer; }
.twt-purchase-form textarea { height: 200px; min-height: 168px; resize: vertical; }
.twt-purchase-form input::placeholder, .twt-purchase-form textarea::placeholder { color: #777168; opacity: 1; }
.twt-purchase-form input:not([type="submit"]):hover,
.twt-purchase-form select:hover,
.twt-purchase-form textarea:hover { border-color: #ed9b65; }
.twt-purchase-form input:focus-visible,
.twt-purchase-form select:focus-visible,
.twt-purchase-form textarea:focus-visible { outline: 2px solid var(--twt-orange); outline-offset: 3px; background: #fff; }
.twt-purchase-form .twt-kit-fields { padding: 20px; border-radius: 10px; background: var(--twt-cream); }
.twt-purchase-form .twt-field-help { margin-top: 10px; color: #66594a; font-size: 14px; font-weight: 400; line-height: 1.8; }
.twt-purchase-form .twt-estimate-notice { margin: 0 0 36px; padding: 20px 24px; border-left: 5px solid var(--twt-orange); border-radius: 8px; background: #fff; }
.twt-purchase-form .twt-estimate-notice strong { display: block; margin-bottom: 8px; color: #ad3500; font-size: 20px; }
.twt-purchase-form .twt-estimate-notice p { font-size: 15px; line-height: 1.9; }
.twt-purchase-form .twt-policy-consent { margin: 0 auto 24px; max-width: 600px; padding: 22px 24px; border: 1px solid #ead9bf; border-radius: 12px; background: #fffdf8; }
.twt-purchase-form .twt-policy-links { margin: 0 0 16px; text-align: center; font-size: 14px; line-height: 1.9; }
.twt-purchase-form .twt-policy-links small { display: block; margin-top: 4px; color: #786f62; font-size: 12px; }
.twt-purchase-form .twt-policy-consent .wpcf7-form-control-wrap { margin-top: 0; }
.twt-purchase-form .twt-policy-consent .wpcf7-list-item { display: block; margin: 0; }
.twt-purchase-form .twt-policy-consent label { display: flex; justify-content: center; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14px; }
.twt-purchase-form input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; min-height: 0; margin: 3px 0 0; padding: 0; accent-color: #bc3c00; cursor: pointer; }
.twt-purchase-form [hidden] { display: none !important; }
.twt-purchase-form .wpcf7-not-valid { border-color: #b32a1e; background: #fff9f7; }
.twt-purchase-form .wpcf7-not-valid-tip { margin-top: 6px; color: #b32a1e; font-size: 14px; font-weight: 500; line-height: 1.6; }
.twt-purchase-form .twt-submit { position: relative; max-width: 600px; margin: 0 auto; text-align: center; }
.twt-purchase-form .twt-submit::after { content: "›"; position: absolute; top: 12px; right: 26px; color: #fff; font-size: 38px; font-weight: 500; line-height: 1; pointer-events: none; }
.twt-purchase-form input[type="submit"] {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 18px 58px;
  border: 3px solid #ffad45;
  border-radius: 14px;
  background: linear-gradient(180deg, #f47716, #e95004);
  box-shadow: 0 6px 0 #b83a00, inset 0 2px 0 rgba(255, 255, 255, .28);
  color: #fff;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: .06em;
  cursor: pointer;
  transition: filter .15s, transform .15s, box-shadow .15s;
}
.twt-purchase-form input[type="submit"]:hover { filter: brightness(1.06); }
.twt-purchase-form input[type="submit"]:active { transform: translateY(3px); box-shadow: 0 3px 0 #b83a00; }
.twt-purchase-form input[type="submit"]:disabled { cursor: wait; opacity: .65; }
.twt-purchase-form .wpcf7-spinner { position: absolute; top: 100%; left: calc(50% - 12px); margin: 12px 0 0; }

/* Match the landing page's cream panels, orange outlines and rounded headings. */
.twt-home-form {
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: 1100px;
  margin: 28px auto 80px;
  padding: 44px 48px 48px;
  border-radius: 24px;
  background: #fff4dc;
  font-size: 16px;
  line-height: 1.8;
}
.twt-home-form .twt-purchase-form { margin: 0 auto; }
.twt-home-form .wpcf7-response-output { max-width: 880px; margin: 24px auto 0; padding: 16px 20px; border-radius: 8px; background: #fff; font-size: 16px; line-height: 1.8; }

@media (max-width: 768px) {
  .twt-home-form { width: calc(100% - 24px); margin: 20px auto 44px; padding: 28px 14px 40px; border-radius: 16px; }
  .twt-purchase-form { font-size: 15px; }
  .twt-purchase-form .twt-form-intro { margin-bottom: 28px; text-align: left; line-height: 1.9; }
  .twt-purchase-form fieldset { margin-bottom: 28px; padding: 22px 16px 24px; border-width: 2px; border-radius: 14px; }
  .twt-purchase-form legend { padding: 7px 28px; font-size: 20px; }
  .twt-purchase-form .twt-required, .twt-purchase-form .twt-optional { margin-left: 4px; padding: 2px 6px; font-size: 11px; }
  .twt-purchase-form input:not([type="submit"]):not([type="checkbox"]), .twt-purchase-form select, .twt-purchase-form textarea { padding: 12px; }
  .twt-purchase-form .twt-kit-fields { padding: 14px; }
  .twt-purchase-form .twt-field-help { font-size: 13px; }
  .twt-purchase-form .twt-policy-consent { padding: 18px 16px; margin-bottom: 20px; }
  .twt-purchase-form .twt-policy-links { text-align: left; }
  .twt-purchase-form .twt-policy-consent label { font-size: 14px; gap: 10px; }
  .twt-purchase-form input[type="submit"] { min-height: 68px; padding: 16px 28px 16px 12px; font-size: 18px; letter-spacing: 0; }
  .twt-purchase-form .twt-estimate-notice { padding: 16px; }
  .twt-purchase-form .twt-estimate-notice strong { font-size: 17px; }
  .twt-purchase-form .twt-submit::after { top: 15px; right: 16px; font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .twt-purchase-form input, .twt-purchase-form select, .twt-purchase-form textarea { transition: none; }
}

/* Optional photos use native file pickers on both phones and computers. */
.twt-purchase-form .twt-photos { margin-top: 30px; padding-top: 26px; border-top: 1px solid #ead9bf; }
.twt-purchase-form .twt-photos h3 { margin: 0; color: var(--twt-ink); font-size: 17px; font-weight: 700; line-height: 1.7; }
.twt-purchase-form .twt-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.twt-purchase-form .twt-photo-slot { min-width: 0; padding: 16px; border: 1px solid #e5d7c5; border-radius: 10px; background: #fffdf8; }
.twt-purchase-form .twt-photo-slot label { font-size: 14px; }
.twt-purchase-form .twt-photo-slot input[type="file"] { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 12px; line-height: 1.8; }
.twt-purchase-form input[type="file"]::file-selector-button { display: block; margin: 0 0 8px; padding: 8px 14px; border: 1px solid #cc5a1d; border-radius: 6px; background: #fff4dc; color: #983700; font: inherit; font-weight: 700; cursor: pointer; }
.twt-purchase-form .twt-photo-preview { display: block; width: 100%; max-height: 160px; object-fit: contain; margin-top: 12px; border-radius: 6px; }
.twt-purchase-form .twt-photo-remove { display: block; margin-top: 10px; padding: 4px 0; border: 0; background: transparent; color: #983700; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.twt-purchase-form .twt-photo-remove:focus-visible { outline: 2px solid var(--twt-orange); outline-offset: 3px; }
@media(max-width:768px) { .twt-purchase-form .twt-photo-grid { grid-template-columns: 1fr; gap: 12px; } }

.twt-purchase-form .twt-photo-status { margin-top: 12px; font-size: 12px; line-height: 1.8; color: #66594a; }
