:root{
    --bg:#f6f7fb;
    --panel:#ffffff;
    --line:#d8dde8;
    --line-strong:#c8cfdd;
    --text:#1f2937;
    --muted:#667085;
    --accent:#1f4ea3;
    --accent-dark:#163b7b;
    --subtle:#eef2f7;
    --danger:#d92d20;
    --danger-bg:#fff4f2;
    --shadow:0 14px 40px rgba(15, 23, 42, .06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;position: relative;overflow-x: hidden;}
body{
    background:var(--bg);
    color:var(--text);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",YuGothic,"Yu Gothic","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;
    line-height:1.7;
}


a{color:var(--accent)}
.entry-page,
.complete-wrap{
    padding:32px 16px 48px;
}
.entry-container,
.complete-card{
    width:min(980px, 100%);
    margin:0 auto;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow);
}
.entry-container{padding:28px}
.complete-card{padding:32px}
.entry-header h1,
.complete-card h1{
    margin:0 0 8px;
    font-size:clamp(1.75rem, 3vw, 2.4rem);
    line-height:1.35;
}
.entry-lead,
.confirm-lead,
.complete-card p,
.complete-time{
    margin:0;
    color:var(--muted);
}
.form-alert{
    margin:24px 0 0;
    padding:14px 16px;
    border:1px solid #f2c7c4;
    background:var(--danger-bg);
    color:#9f1d14;
    border-radius:14px;
}
.entry-form{margin-top:24px}
.form-step{display:block}
.form-step.is-hidden{display:none}
.form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px 20px;
}
.form-field,
.form-subfield{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.form-field-wide,
.form-subfield-wide{
    grid-column:1 / -1;
}
label,
legend{
    font-weight:700;
    color:#24324a;
}
legend{margin-bottom:12px}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select{
    width:100%;
    border:1px solid var(--line-strong);
    border-radius:12px;
    background:#fff;
    color:var(--text);
    padding:12px 14px;
    font:inherit;
}
textarea{resize:vertical;min-height:120px}
input:focus,
textarea:focus,
select:focus{
    outline:none;
    border-color:#7aa2f7;
    box-shadow:0 0 0 4px rgba(31,78,163,.12);
}
fieldset{
    margin:0;
    padding:18px;
    border:1px solid var(--line);
    border-radius:16px;
}
.required-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:6px;
    padding:2px 8px;
    border-radius:999px;
    background:var(--danger);
    color:#fff;
    font-size:.74rem;
    font-weight:700;
    vertical-align:middle;
}
.field-error{
    min-height:1.3em;
    margin:0;
    color:var(--danger);
    font-size:.92rem;
}
.file-upload{
    display:grid;
    gap:8px;
}
.file-help,
.file-name,
.confirm-file-name{
    margin:0;
    color:var(--muted);
    font-size:.92rem;
}
.photo-preview-wrap,
#confirm_photo_preview_wrap{
    margin-top:6px;
}
.photo-preview-wrap img,
#confirm_photo_preview{
    display:block;
    max-width:220px;
    width:100%;
    height:auto;
    border-radius:14px;
    border:1px solid var(--line);
    background:#fff;
}
.checkbox-group{
    display:flex;
    flex-wrap:wrap;
    gap:12px 16px;
}
.checkbox-item{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:400;
}
.checkbox-item input{
    width:18px;
    height:18px;
}
.agreement{
    align-items:flex-start;
}
.other-wrap{
    margin-top:14px;
    display:grid;
    gap:8px;
}
.other-wrap.is-hidden,
.is-hidden{display:none !important}
.academic-rows{
    display:grid;
    gap:14px;
}
.academic-row{
    padding:16px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fbfcfe;
}
.academic-row-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:12px 14px;
}
.row-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:14px;
}
.form-actions{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
    margin-top:28px;
}
.button{
    appearance:none;
    border:none;
    border-radius:12px;
    padding:12px 20px;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.button-primary{
    background:var(--accent);
    color:#fff;
}
.button-primary:hover{background:var(--accent-dark)}
.button-primary:disabled{
    background:#9bb0da;
    cursor:not-allowed;
}
.button-secondary{
    background:var(--subtle);
    color:#24324a;
    border:1px solid var(--line);
}
.button-small{
    padding:10px 14px;
    font-size:.94rem;
}
.confirm-box h2{
    margin:0 0 8px;
    font-size:1.45rem;
}
.confirm-list{
    margin:20px 0 0;
    padding:0;
    display:grid;
    gap:0;
}
.confirm-item{
    display:grid;
    grid-template-columns:220px 1fr;
    gap:14px;
    padding:18px 0;
    border-top:1px solid var(--line);
}
.confirm-item:first-child{border-top:none}
.confirm-item dt{
    font-weight:700;
    color:#24324a;
}
.confirm-item dd{
    margin:0;
    white-space:pre-wrap;
    word-break:break-word;
}
.complete-number{
    margin:24px 0 8px;
    padding:18px 20px;
    border-radius:16px;
    background:#f5f9ff;
    border:1px solid #cfe0ff;
    font-size:1.2rem;
    font-weight:800;
    color:#163b7b;
}
.complete-card ul{
    margin:20px 0 0;
    padding-left:1.2em;
}
.complete-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:28px;
}
@media (max-width: 860px){
    .form-grid{grid-template-columns:1fr}
    .academic-row-grid{grid-template-columns:1fr 1fr}
    .confirm-item{grid-template-columns:1fr}
}
@media (max-width: 560px){
    .entry-page,
    .complete-wrap{padding:18px 12px 30px}
    .entry-container,
    .complete-card{padding:18px}
    .academic-row-grid{grid-template-columns:1fr}
    .row-actions,
    .form-actions,
    .complete-actions{justify-content:stretch}
    .button{width:100%}
}



.privacy-modal-link{
    text-decoration: underline;
    cursor: pointer;
}

.privacy-modal{
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.privacy-modal.is-hidden{
    display: none;
}

.privacy-modal__overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.privacy-modal__dialog{
    position: relative;
    z-index: 1;
    width: min(920px, calc(100% - 24px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}

.privacy-modal__header{
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.privacy-modal__header h2{
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
}

.privacy-modal__body{
    padding: 20px;
    overflow-y: auto;
    line-height: 1.8;
}

.privacy-modal__body h3{
    margin: 24px 0 8px;
    font-size: 18px;
}

.privacy-modal__body p{
    margin: 0 0 14px;
}

.privacy-modal__body ul,
.privacy-modal__body ol{
    margin: 0 0 14px 1.4em;
    padding: 0;
}

.privacy-modal__footer{
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    text-align: center;
}

body.is-privacy-modal-open{
    overflow: hidden;
}