*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 500;
  color: #111827;
  background: #F3F4F6;
  line-height: 1.5;
  min-width: 320px;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  background: #fff;
  color: #0A1B3D;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.corp-head {
  background: #0A1B3D;
  color: #fff;
}

.corp-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 448px;
  margin: 0 auto;
  padding: 14px 16px;
}

.mark-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.mark-name {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mark-name-a {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mark-name-b {
  font-size: 0.72rem;
  font-weight: 600;
  color: #93C5FD;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.age-tag {
  margin: 0;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-band {
  background: #0A1B3D;
  color: #fff;
  padding: 8px 16px 84px;
}

.hero-band-inner {
  max-width: 448px;
  margin: 0 auto;
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93C5FD;
}

.hero-band h1 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 6.2vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 18ch;
}

.hero-note {
  margin: 0;
  max-width: 36ch;
  color: #D1D5DB;
  font-size: 0.92rem;
}

.corp-main {
  max-width: 448px;
  margin: 0 auto;
  padding: 0 16px 8px;
}

.calc-sheet {
  position: relative;
  z-index: 2;
  margin-top: -56px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px 18px;
}

.field {
  margin-bottom: 22px;
}

.field-cap {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
}

.amount-figure {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 8vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.chip,
.seg,
.btn,
.faq-q {
  font: inherit;
  cursor: pointer;
}

.chip,
.seg {
  min-height: 54px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  color: #111827;
  border-radius: 12px;
  font-weight: 700;
}

.chip.is-on,
.seg.is-on {
  background: #1D4ED8;
  border-color: #1D4ED8;
  color: #fff;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #1D4ED8 var(--progress, 31%), #E5E7EB var(--progress, 31%));
  margin: 4px 0 8px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0A1B3D;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #1D4ED8;
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0A1B3D;
  border: 3px solid #fff;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6B7280;
}

.seg-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.seg {
  padding: 0;
}

.seg-hint {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: #374151;
}

.sheet-note,
.result-note {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: #4B5563;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  font-weight: 800;
}

.btn-main {
  background: #1D4ED8;
  color: #fff;
}

.btn-ghost {
  margin-top: 8px;
  background: #F3F4F6;
  color: #111827;
}

.btn:disabled {
  opacity: 0.55;
}

.state-box {
  text-align: center;
  padding: 18px 4px 6px;
}

.spin {
  width: 44px;
  height: 44px;
  margin: 8px auto 16px;
  border: 3px solid #E5E7EB;
  border-top-color: #1D4ED8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.state-sub {
  margin: 0;
  color: #6B7280;
}

.code-cap {
  margin: 16px 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B7280;
}

.app-code {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #0A1B3D;
}

.sum-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: #F3F4F6;
  border-radius: 12px;
  text-align: left;
}

.sum-card span {
  display: block;
  font-size: 0.75rem;
  color: #6B7280;
}

.sum-card strong {
  font-size: 1rem;
}

.process-rail,
.plus-rows,
.faq-block {
  margin-top: 28px;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 800;
}

.rail {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #E5E7EB;
}

.rail li:last-child {
  border-bottom: 1px solid #E5E7EB;
}

.rail-num {
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1D4ED8;
  letter-spacing: 0.04em;
}

.rail-title {
  margin: 0 0 4px;
  font-weight: 800;
}

.rail-text,
.plus-text,
.faq-a p {
  margin: 0;
  color: #4B5563;
  font-size: 0.92rem;
}

.plus-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}

.plus-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 12px;
  color: #1D4ED8;
}

.plus-title {
  margin: 0 0 2px;
  font-weight: 800;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.faq-a {
  display: none;
  padding: 0 16px 14px;
}

.faq-item.is-open .faq-a {
  display: block;
}

.corp-foot {
  margin-top: 32px;
  background: #0A1B3D;
  color: #D1D5DB;
  padding: 28px 16px 36px;
}

.corp-foot p {
  max-width: 448px;
  margin: 0 auto 10px;
  font-size: 0.86rem;
}

.foot-brand {
  color: #fff;
  font-weight: 800;
}

.foot-nav {
  max-width: 448px;
  margin: 16px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-nav a {
  color: #93C5FD;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #93C5FD;
  text-decoration: none;
  font-weight: 700;
}

.legal-hero {
  background: #0A1B3D;
  color: #fff;
  padding: 8px 16px 28px;
}

.legal-hero-inner,
.legal-wrap {
  max-width: 448px;
  margin: 0 auto;
}

.legal-hero h1 {
  margin: 16px 0 0;
  font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  font-weight: 800;
}

.legal-paper {
  margin: 16px;
  padding: 20px 16px;
  background: #fff;
  border-radius: 12px;
}

.legal-paper h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.legal-paper p,
.legal-paper li {
  font-size: 0.94rem;
  color: #374151;
}

.legal-paper ul {
  padding-left: 1.2em;
}

.legal-page .corp-foot {
  margin-top: 8px;
}

@media (min-width: 480px) {
  .chip-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .calc-sheet,
  .legal-paper {
    padding: 24px 22px;
  }

  .foot-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
