:root {
    --navy: #17365d;
    --blue: #1f5f99;
    --blue-soft: #eaf3fb;
    --orange: #dd6b20;
    --red: #b42318;
    --green: #16794a;
    --ink: #1f2937;
    --muted: #667085;
    --line: #d0d5dd;
    --surface: #ffffff;
    --background: #f4f7fb;
    --radius: 14px;
    --shadow: 0 8px 28px rgba(23, 54, 93, .09);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
    line-height: 1.7;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, input[type="file"], select { cursor: pointer; }

.site-header { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.13); }
.site-header__inner { max-width: 1160px; margin: 0 auto; padding: 15px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 7px; font-size: .9rem; }
.nav a:hover, .nav a:focus { background: rgba(255,255,255,.16); }
.container { max-width: 1120px; margin: 0 auto; padding: 26px 24px 64px; }
.user-strip { display: flex; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.user-strip strong { color: var(--ink); }

.hero { padding: 34px; color: #fff; border-radius: 20px; background: linear-gradient(135deg, #17365d, #287bb9 72%, #58a5d5); box-shadow: var(--shadow); }
.hero h1 { margin: 3px 0 8px; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; }
.hero p:last-child { max-width: 760px; margin-bottom: 0; }
.eyebrow, .phase-label { margin: 0; color: var(--orange); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; font-size: .8rem; }
.hero .eyebrow { color: #fbd38d; }
.page-title { margin: 8px 0 22px; }
.page-title h1 { margin: 5px 0 8px; font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.35; color: var(--navy); }
.page-title p:last-child { color: var(--muted); max-width: 900px; }

.phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 24px 0; }
.phase-card { position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border-top: 6px solid var(--blue); }
.phase-card--two { border-color: var(--orange); }
.phase-card h2 { color: var(--navy); margin: 0 0 8px; }
.phase-card p { color: var(--muted); min-height: 82px; }
.phase-number { position: absolute; top: 12px; right: 20px; font-size: 5rem; line-height: 1; font-weight: 900; color: rgba(31,95,153,.08); }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--blue); border-radius: 9px; padding: 10px 20px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; transition: .15s ease; }
.button:hover, .button:focus { filter: brightness(.93); transform: translateY(-1px); }
.button--secondary { background: var(--orange); border-color: var(--orange); }
.button--danger { background: var(--red); border-color: var(--red); }
.button--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.button--full { width: 100%; }
.button[disabled] { opacity: .55; cursor: wait; transform: none; }

.notice-panel, .info-card, .form-card, .form-section, .complete-card, .login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.notice-panel { padding: 22px 26px; margin: 22px 0; border-left: 5px solid var(--blue); }
.notice-panel h2 { margin-top: 0; color: var(--navy); }
.steps-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-left: 22px; }
.info-card { padding: 20px 24px; margin: 18px 0; border: 1px solid #d9e7f4; }
.info-card h2 { margin: 0 0 12px; color: var(--navy); font-size: 1.1rem; }
.info-card--phase1 { background: var(--blue-soft); }
.summary-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.summary-list div { min-width: 0; }
.summary-list dt { color: var(--muted); font-size: .78rem; }
.summary-list dd { margin: 1px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.summary-list.compact { margin-top: 14px; }

.form-card { padding: 28px; }
.multi-form { display: grid; gap: 22px; }
.form-section { margin: 0; padding: 26px; border: 1px solid #dbe2ea; }
.form-section legend { padding: 0 10px; color: var(--navy); font-size: 1.25rem; font-weight: 800; }
.form-section legend span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 9px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .9rem; }
.form-section--consent { border-color: #f4b183; background: #fffaf5; }
.form-section--consent legend span { background: var(--orange); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { margin: 0 0 18px; min-width: 0; }
.field label, .field-label { display: block; margin-bottom: 6px; color: #344054; font-weight: 700; }
.field input[type="text"], .field input[type="password"], .field input[type="number"], .field input[type="date"], .field input[type="tel"], .field select, .field textarea {
    width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #98a2b3; border-radius: 8px; color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(31,95,153,.18); border-color: var(--blue); }
.field input[readonly] { background: #f2f4f7; color: #475467; cursor: default; }
.field input[type="file"] { width: 100%; padding: 10px; border: 1px dashed #98a2b3; border-radius: 8px; background: #fff; }
.required { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: #fee4e2; color: var(--red); font-size: .7rem; vertical-align: 1px; }
.help { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.field-error { margin: 5px 0 0; color: var(--red); font-weight: 700; font-size: .84rem; }
.input-unit { display: grid; grid-template-columns: 1fr auto; align-items: stretch; }
.input-unit input { border-radius: 8px 0 0 8px !important; }
.input-unit span { display: grid; place-items: center; min-width: 58px; padding: 0 10px; border: 1px solid #98a2b3; border-left: 0; border-radius: 0 8px 8px 0; background: #f2f4f7; font-weight: 700; }
.radio-group { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.radio-group label, .check-line { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.radio-group input, .check-line input { width: 19px; height: 19px; margin-top: 3px; flex: 0 0 auto; }
.consent-box { padding: 18px; margin-bottom: 18px; border: 2px solid #f0a36a; border-radius: 10px; background: #fff; }
.consent-box p { margin-top: 0; }
.subheading { margin: 6px 0 14px; padding-bottom: 5px; border-bottom: 2px solid #dce7f2; color: var(--navy); font-size: 1.03rem; }
.compact-list { margin: 8px 0 20px; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 7px 24px rgba(23,54,93,.15); }

.alert { margin: 14px 0; padding: 13px 16px; border-radius: 9px; border-left: 5px solid #667085; background: #f2f4f7; }
.alert ul { margin-bottom: 0; }
.alert--error { border-color: var(--red); background: #fef3f2; color: #7a271a; }
.alert--warning { border-color: var(--orange); background: #fffaeb; color: #7a2e0e; }
.alert--success { border-color: var(--green); background: #ecfdf3; color: #085d3a; }
.alert--info { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }

.login-wrap { min-height: 65vh; display: grid; place-items: center; }
.login-card { width: min(460px, 100%); padding: 32px; }
.login-card h1 { margin: 4px 0 0; color: var(--navy); }
.login-sub-link { margin: 18px 0 0; text-align: center; font-size: .86rem; }
.admin-title-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.user-editor { margin: 18px 0; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.user-editor h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; color: var(--navy); font-size: 1.08rem; }
.password-state { padding: 3px 8px; border-radius: 99px; background: #eaf3fb; color: var(--blue); font-size: .72rem; font-weight: 700; }
.user-enabled { margin-bottom: 16px; }
.muted { color: var(--muted); }
.complete-card { max-width: 760px; margin: 20px auto; padding: 34px; text-align: center; }
.complete-card .notice-panel { text-align: left; }
.complete-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: #dcfae6; color: var(--green); font-size: 2.4rem; font-weight: 900; }
.request-id { display: inline-flex; gap: 10px; padding: 10px 18px; border-radius: 8px; background: #eef4fa; color: var(--navy); }
.site-footer { padding: 20px; text-align: center; color: var(--muted); font-size: .78rem; }
[hidden] { display: none !important; }

@media (max-width: 820px) {
    .site-header__inner { align-items: flex-start; flex-direction: column; gap: 8px; }
    .container { padding: 18px 14px 48px; }
    .phase-grid, .form-row, .form-row--three, .upload-grid, .summary-list, .steps-inline { grid-template-columns: 1fr; }
    .phase-card p { min-height: 0; }
    .form-card, .form-section { padding: 20px 16px; }
    .sticky-actions { position: static; }
    .admin-title-row { align-items: flex-start; flex-direction: column; }
}

@media print {
    .site-header, .site-footer, .form-actions, .user-strip { display: none !important; }
    body { background: #fff; color: #000; font-size: 10pt; }
    .container { max-width: none; padding: 0; }
    .form-section, .info-card, .notice-panel { box-shadow: none; break-inside: avoid; }
}
