:root {
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #173047;
  background: #f3f6f8;
  font-synthesis: none;
  --accent: #205fc7;
  --border: #ccd8e4;
  --muted: #52667b;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.75; }
a { color: #174f9f; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { max-width: 100%; }
button { min-height: 44px; padding: 9px 17px; border: 1px solid var(--border); border-radius: 6px; background: white; color: #173047; cursor: pointer; font-weight: 700; }
button:hover:not(:disabled) { background: #e8f0fd; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #e7a026; outline-offset: 3px; }
input, select, textarea { border: 1px solid #8096ac; border-radius: 5px; padding: 10px 12px; background: white; color: inherit; min-height: 44px; }
input[type="checkbox"], input[type="radio"] { min-height: 20px; width: 20px; height: 20px; accent-color: var(--accent); vertical-align: middle; }
textarea { width: 100%; resize: vertical; line-height: 1.8; }
label { font-weight: 650; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 750; padding: 0 0 12px; }
.site-header { background: white; border-bottom: 1px solid var(--border); padding: 16px max(20px, calc((100vw - 1140px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 800; text-decoration: none; color: #173047; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.wrap { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.intro { padding: 38px 0 24px; }
h1 { font-size: clamp(27px, 4.2vw, 44px); line-height: 1.4; letter-spacing: -.025em; margin: 0 0 10px; }
h2 { font-size: 22px; line-height: 1.5; margin: 0 0 18px; }
h3 { font-size: 18px; line-height: 1.6; }
p { margin: 0 0 14px; }
.intro p { max-width: 70ch; margin-bottom: 7px; }
.workspace { min-width: 0; }
.panel { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 26px; min-width: 0; }
.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #174b9e; }
.secondary { background: white; }
.error { color: #ae2439; font-weight: 650; overflow-wrap: anywhere; }
.error:empty { display: none; }
.notice { background: #e8f0fd; padding: 14px 18px; border-radius: 6px; }
.muted { color: var(--muted); font-size: 14px; }
.result { font-variant-numeric: tabular-nums; }
.details { margin: 34px 0; max-width: 80ch; }
.details h2 { margin-top: 32px; }
.details li { margin: 8px 0; }
details { padding: 14px 0; border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 12px 0 0; }
.site-footer { margin-top: 48px; padding: 26px 0; border-top: 1px solid var(--border); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; }
.skip-link { position: absolute; left: 12px; top: -100px; background: white; padding: 12px; z-index: 10; }
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px); }
  .site-header { padding: 12px 14px; gap: 8px; }
  .intro { padding-top: 25px; }
  .panel { padding: 18px; }
  .site-header nav { font-size: 13px; gap: 6px 13px; }
  .actions > button { flex: 1 1 auto; }
}
@media print {
  body { background: white; color: black; }
  .site-header, .site-footer, .actions, .skip-link { display: none; }
  .wrap { width: 100%; }
  .panel { break-inside: avoid; border: 1px solid #aaa; }
  input, select, textarea { border: 0; }
}
