*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --navy: #101b33;
  --ink: #162033;
  --muted: #64748b;
  --line: #d8e2f2;
  --blue: #246bfe;
  --blue-dark: #174dd6;
  --blue-soft: #eaf2ff;
  --orange: #f97316;
  --orange-dark: #dd5b06;
  --green: #0f9f6e;
  --red: #dc2626;
  --paper: rgba(255, 255, 255, 0.94);
  --shadow: 0 18px 55px rgba(18, 32, 58, 0.1);
  --radius-lg: 26px;
  --radius-md: 16px;
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(36, 107, 254, 0.18), transparent 33%),
    radial-gradient(circle at 92% 18%, rgba(249, 115, 22, 0.1), transparent 28%),
    linear-gradient(180deg, #f3f7ff 0%, #f8fbff 45%, #eef5ff 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.quote-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.quote-hero {
  position: relative;
  padding: 8px 4px 20px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quote-hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.hero-lead {
  margin: 14px 0 0;
  max-width: 720px;
  color: #475569;
  font-size: 15px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-note span {
  padding: 7px 12px;
  color: #0f3f91;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(36, 107, 254, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.quote-form {
  display: grid;
  gap: 18px;
}

.form-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid rgba(190, 211, 244, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-card-important {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 18px 60px rgba(249, 115, 22, 0.14);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(23px, 5vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.section-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-bottom: 22px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  color: #26364f;
  font-size: 14px;
  font-weight: 800;
}

.required,
.optional {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.required {
  color: #b91c1c;
  background: #fee2e2;
}

.optional {
  color: #31516d;
  background: #e8eef7;
}

.input-text {
  width: 100%;
  padding: 15px 16px;
  color: var(--navy);
  background: #f8fbff;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  transition: 0.24s ease;
}

.input-text:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.11);
}

.input-text[readonly] {
  color: #42526d;
  background: #eef4fb;
}

.input-postal {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.select-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.textarea {
  resize: vertical;
  min-height: 132px;
}

.field-hint,
.submit-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.file-drop {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 28px;
  color: #174483;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(234, 242, 255, 0.9)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(36, 107, 254, 0.04) 12px 24px);
  border: 2px dashed rgba(36, 107, 254, 0.45);
  border-radius: 24px;
  cursor: pointer;
  text-align: center;
  transition: 0.24s ease;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(36, 107, 254, 0.12);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  border-radius: 18px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.file-main {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.file-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #32425d;
  font-size: 13px;
  font-weight: 700;
}

.file-size {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.security-note,
.address-note,
.privacy-copy {
  margin: 10px 0 0;
  padding: 12px 14px;
  color: #31516d;
  background: #eff6ff;
  border: 1px solid #d7e8ff;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
}

.check-grid {
  display: grid;
  gap: 10px;
}

.check-card,
.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  color: #24344c;
  background: #f8fbff;
  border: 2px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.check-card:has(input:checked),
.privacy-check:has(input:checked) {
  background: #eef5ff;
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(36, 107, 254, 0.1);
}

.check-card input,
.privacy-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.privacy-check-text {
  flex: 1 1 auto;
  min-width: 0;
}

.privacy-required {
  flex: 0 0 auto;
}

.other-input {
  margin-top: 10px;
}

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

.address-box {
  padding: 18px;
  background: rgba(238, 245, 255, 0.62);
  border: 1px solid rgba(36, 107, 254, 0.16);
  border-radius: 20px;
}

.postal-feedback {
  min-height: 22px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
}

.postal-feedback .success {
  color: var(--green);
}

.postal-feedback .error {
  color: var(--red);
}

.postal-feedback .loading {
  color: var(--blue);
}

.submit-card {
  border-color: rgba(249, 115, 22, 0.38);
}

.privacy-box {
  margin-bottom: 18px;
}

.privacy-box .field-error:empty,
.submit-note:empty {
  display: none;
}

.submit-button {
  width: 100%;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border: 0;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.24);
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  transition: 0.22s ease;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(249, 115, 22, 0.3);
}

.submit-button.is-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.2);
}

@media (max-width: 680px) {
  .quote-page {
    width: min(100% - 20px, 760px);
    padding: 24px 0 48px;
  }

  .form-card {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .file-drop {
    min-height: 166px;
    padding: 22px 14px;
  }

  .check-card,
  .privacy-check {
    padding: 13px;
  }

  .privacy-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
  }

  .privacy-check input {
    grid-row: 1 / span 2;
  }

  .privacy-required {
    justify-self: start;
  }
}
