:root {
  color: #102d45;
  background: #f5f8fb;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.65;
  --ink: #102d45;
  --paper: #f5f8fb;
  --accent: #355d7b;
  --teal: #18737e;
  --rule: #cddae4;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.bar, main { width: min(calc(100% - 2 * clamp(20px, 5.3vw, 86px)), 1320px); margin-inline: auto; }
header { border-top: 4px solid var(--accent); background: #fff; }
.bar { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
header .bar, footer { border-bottom: 1px solid var(--rule); }
.office-logo { display: block; flex-shrink: 1; min-width: 0; }
.bar img { display: block; width: min(220px, 100%); height: auto; }
nav { display: flex; gap: clamp(14px, 2.5vw, 34px); flex-wrap: wrap; font-size: .84rem; font-weight: 700; }
.languages { position: relative; z-index: 1; flex: 0 0 auto; font-size: .88rem; color: var(--accent); }
.languages summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 8px 4px; }
.languages summary::-webkit-details-marker { display: none; }
.language-dot { width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; background: #dae6ef; }
.languages summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -3px 0 0 3px; }
.languages[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.languages nav { position: absolute; inset-inline-end: 0; top: calc(100% + 5px); min-width: 154px; max-height: min(50vh, 340px); overflow: auto; display: grid; gap: 2px; padding: 6px; background: white; border: 1px solid var(--rule); box-shadow: 0 8px 24px #102d451c; }
.languages nav a { text-decoration: none; white-space: nowrap; padding: 8px 11px; }
.languages nav a:hover, .languages nav a[aria-current] { color: var(--ink); background: #eaf2f7; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.64fr) minmax(0, 1fr); gap: clamp(36px, 8vw, 120px); padding: clamp(48px, 6vw, 96px) 0 clamp(44px, 6vw, 88px); }
.hero { min-width: 0; }
.brand { display: flex; align-items: center; gap: 15px; margin: 0 0 clamp(25px, 3vw, 42px); font-family: Arial, sans-serif; }
.visa-mark { position: relative; display: block; width: 54px; height: 54px; flex: 0 0 54px; }
.visa-mark::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(116deg, var(--ink) 51%, #326f81 51%);
  clip-path: polygon(0 21%, 25% 21%, 53% 73%, 76% 29%, 96% 29%, 57% 100%, 43% 100%);
}
.visa-mark::after {
  content: ''; position: absolute; inset: 0;
  background: #18737e;
  clip-path: polygon(85% 0, 89% 10%, 100% 14%, 89% 18%, 85% 28%, 81% 18%, 70% 14%, 81% 10%);
}
.brand-wordmark { display: grid; gap: 4px; line-height: 1; padding-top: 4px; }
.brand-wordmark span { font-size: .69rem; font-weight: 750; letter-spacing: .16em; color: var(--accent); }
.brand-wordmark strong { font-size: 1.9rem; font-weight: 800; letter-spacing: .075em; }
h1 { font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif; font-size: clamp(2.5rem, 4.3vw, 4.35rem); font-weight: 700; line-height: 1.26; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
:lang(ja) h1 { text-wrap: wrap; line-break: strict; }
.summary { margin: clamp(24px, 3vw, 38px) 0 24px; max-width: 31em; font-size: clamp(1rem, 1.35vw, 1.18rem); }
.primary { display: inline-flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 28px; padding: 12px 19px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 0; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: background .18s, border-color .18s; }
.primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.primary:disabled { opacity: .6; cursor: wait; }
.notice { margin: 16px 0 0; max-width: 39em; color: #4c6275; font-size: .84rem; }
.flow { align-self: start; background: var(--ink); color: var(--paper); border-top: 4px solid #6da5b7; padding: clamp(20px, 3.3vw, 44px); }
h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.35; letter-spacing: -.025em; }
.flow h2 { margin-bottom: 22px; }
.flow ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.flow li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid #466274; counter-increment: step; font-size: .94rem; }
.flow li::before { content: counter(step, decimal-leading-zero); color: #9bd4dc; font: 700 .8rem/1.8 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.intake { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 2fr); gap: 20px 40px; border-top: 2px solid var(--ink); padding: clamp(24px, 4vw, 50px) 0 clamp(40px, 6vw, 85px); scroll-margin-top: 22px; }
.intake form, #check-result, .contact { grid-column: 2; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 16px; }
.field-help { margin: 10px 0 20px; font-size: .86rem; color: #4c6275; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .86rem; }
select { font: inherit; color: inherit; background: #fff; width: 100%; padding: 10px 8px; min-height: 47px; border: 1px solid #8098a9; border-radius: 0; }
select:invalid { color: #4c6275; }
.intake button { background: var(--ink); border-color: var(--ink); }
.intake button:hover { background: var(--accent); border-color: var(--accent); }
#check-result:empty { display: none; }
#check-result:not(:empty) { border-top: 1px solid var(--rule); padding-top: 12px; }
.contact { margin: 0; font-size: .9rem; }
footer { border-top: 1px solid var(--ink); border-bottom: 0; }
footer .bar { min-height: 74px; font-size: .85rem; }
@media (max-width: 800px) {
  .lead-grid { gap: 32px; }
  .intake { grid-template-columns: 1fr; }
  .intake form, #check-result, .contact { grid-column: 1; }
}
@media (max-width: 620px) {
  .bar { min-height: 70px; flex-wrap: wrap; padding-block: 12px; }
  .bar img { width: 156px; }
  nav { font-size: .78rem; gap: 12px; }
  .lead-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); }
  :lang(ja) h1 { font-size: clamp(1.65rem, 7.6vw, 2.85rem); }
  .flow { padding: 20px 22px; }
}
@media (prefers-reduced-motion: reduce) { .primary { transition: none; } }
