:root {
  color-scheme: light;
  --navy: #0d2146;
  --navy-soft: #17325f;
  --gold: #c9a65b;
  --paper: #f5f1e9;
  --white: #fffdf8;
  --ink: #17243a;
  --muted: #637086;
  --line: rgba(13, 33, 70, .18);
  --danger: #9e3232;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0, rgba(201, 166, 91, .13), transparent 32rem),
    var(--paper);
  font-family: "Noto Sans JP", "Noto Sans TC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

a { color: inherit; }

.app-header {
  min-height: 78px;
  padding: 16px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(201, 166, 91, .42);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.35;
  text-decoration: none;
}

.app-brand img {
  width: 42px;
  height: 42px;
  opacity: .76;
}

.app-back {
  color: #fff;
  font-size: 13px;
  text-underline-offset: 5px;
}

main {
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0 80px;
}

.app-hero { max-width: 780px; }

.app-eyebrow,
.app-status {
  margin: 0 0 13px;
  color: #9b762e;
  font: 700 11px/1.3 Georgia, "Times New Roman", serif;
  letter-spacing: .22em;
}

h1, h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Yu Mincho", "Noto Serif JP", "Noto Serif TC", "Noto Serif SC", serif;
  font-weight: 500;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.32; }
h2 { font-size: clamp(25px, 4vw, 36px); line-height: 1.4; }
h3 { margin: 0; color: var(--navy); font-size: 19px; }

.app-lead {
  max-width: 700px;
  margin: 24px 0 0;
  color: #3e4f68;
  font-size: clamp(15px, 2vw, 18px);
}

.app-service {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 28px;
  padding: 13px 18px;
  border: 1px solid rgba(201, 166, 91, .68);
  background: rgba(255, 253, 248, .62);
}

.app-service strong { color: var(--navy); }
.app-service span { color: #7d5a19; font-weight: 700; }

.app-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 40px 0 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
}

.app-steps li {
  min-height: 62px;
  padding: 18px;
  background: rgba(255, 253, 248, .88);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.app-privacy {
  margin: 28px 0 0;
  padding: 17px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 253, 248, .66);
  color: #4b5b70;
  font-size: 13px;
}

.app-card {
  margin-top: 38px;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 18px 56px rgba(13, 33, 70, .08);
}

.app-card > p { max-width: 690px; margin: 18px 0 0; }

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}

.app-button {
  min-height: 50px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  border-radius: 0;
  color: #fff;
  background: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  cursor: pointer;
}

.app-button:hover,
.app-button:focus-visible { background: var(--navy-soft); }
.app-button:focus-visible,
.app-text-link:focus-visible { outline: 3px solid rgba(201, 166, 91, .65); outline-offset: 3px; }
.app-button:disabled { cursor: wait; opacity: .62; }
.app-button--light { color: var(--navy); background: transparent; }

.app-text-link {
  color: var(--navy);
  font-weight: 700;
  text-underline-offset: 5px;
}

.app-local-state,
.app-chart-preview {
  padding: 15px 17px;
  background: #f0f3f7;
  color: var(--navy);
}

.app-chart-preview { white-space: pre-line; }

.app-chart-list {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 0;
  border: 0;
}

.app-unsaved-offer {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid rgba(201, 166, 91, .62);
  background: #fffaf0;
}

.app-unsaved-offer > p { margin: 12px 0 0; }

.app-chart-choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

label.app-chart-choice { cursor: pointer; }
.app-chart-choice.is-selected { border-color: var(--gold); background: #fffaf0; }
.app-chart-choice input { margin-top: 6px; accent-color: var(--navy); }
.app-chart-choice span { display: grid; gap: 4px; }
.app-chart-choice strong { color: var(--navy); font-size: 17px; }
.app-chart-choice small, .app-chart-choice > span { color: var(--muted); }

.app-contact {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.app-contact > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.app-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.app-field-grid label,
.app-optional__body label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.app-field-grid input,
.app-optional textarea {
  width: 100%;
  border: 1px solid rgba(13, 33, 70, .28);
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.app-field-grid input { min-height: 50px; padding: 10px 13px; }
.app-optional textarea { min-height: 96px; padding: 12px 13px; resize: vertical; }

.app-field-grid input:focus-visible,
.app-optional textarea:focus-visible,
.app-optional summary:focus-visible {
  outline: 3px solid rgba(201, 166, 91, .55);
  outline-offset: 2px;
  border-color: var(--navy);
}

.app-optional {
  margin-top: 26px;
  border: 1px solid var(--line);
  background: #faf8f3;
}

.app-optional summary {
  padding: 16px 18px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.app-optional__body {
  display: grid;
  gap: 18px;
  padding: 4px 18px 20px;
}

.app-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: #f7f5ef;
  cursor: pointer;
}

.app-consent input { flex: 0 0 auto; margin-top: 7px; accent-color: var(--navy); }

.app-error {
  margin: 22px 0 0;
  padding: 14px 17px;
  border: 1px solid rgba(158, 50, 50, .28);
  color: var(--danger);
  background: #fff2f1;
}

.app-note { color: var(--muted); font-size: 13px; }
.app-center { text-align: center; }

.app-button--submit { min-width: min(100%, 320px); }

.app-receipt {
  display: inline-grid;
  gap: 3px;
  margin: 24px 0 18px;
  padding: 12px 16px;
  border: 1px solid rgba(201, 166, 91, .58);
  background: #fffaf0;
}

.app-receipt small { color: var(--muted); }
.app-receipt strong { color: var(--navy); letter-spacing: .08em; }

.app-payment {
  margin-top: 26px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  background: #f7f5ef;
}

.app-payment > p { margin: 14px 0 0; }
.app-payment .app-button { margin-top: 18px; }

.app-bank {
  display: grid;
  gap: 1px;
  margin: 18px 0 0;
  background: var(--line);
}

.app-bank div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 11px 13px;
  background: #fff;
}

.app-bank dt { color: var(--muted); font-size: 12px; }
.app-bank dd { margin: 0; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }

footer {
  padding: 26px 20px;
  color: rgba(255, 255, 255, .72);
  background: var(--navy);
  font-size: 11px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

@media (max-width: 680px) {
  .app-header { align-items: flex-start; }
  .app-back { max-width: 160px; text-align: right; }
  main { width: min(100% - 28px, 940px); padding-top: 40px; }
  .app-steps { grid-template-columns: 1fr; }
  .app-steps li { min-height: auto; }
  .app-card { padding: 24px 20px; }
  .app-field-grid { grid-template-columns: 1fr; }
  .app-actions { align-items: stretch; }
  .app-button { width: 100%; }
  .app-text-link { display: block; width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
