.jred-wrap {
    --jred-blue: #19448e;
    --jred-blue-dark: #103269;
    --jred-blue-light: #edf3fb;
    --jred-ink: #202938;
    --jred-muted: #667085;
    --jred-border: #d8e0ec;
    --jred-success: #25734a;
    --jred-warning: #a24a00;
    color: var(--jred-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.85;
    max-width: 920px;
    margin: 0 auto;
}
.jred-wrap *, .jred-wrap *::before, .jred-wrap *::after { box-sizing: border-box; }
.jred-wrap h1, .jred-wrap h2 { color: #172033; line-height: 1.45; }
.jred-wrap h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: .25rem 0 1rem; }
.jred-wrap h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 0 0 1rem; }
.jred-wrap p { margin: 0 0 1rem; }
.jred-hero { padding: clamp(2rem, 7vw, 4.5rem) clamp(1rem, 5vw, 3rem); text-align: center; background: linear-gradient(145deg, #f7faff, #eaf1fb); border: 1px solid var(--jred-border); border-radius: 24px; margin-bottom: 1.5rem; }
.jred-eyebrow { color: var(--jred-blue); font-weight: 800; letter-spacing: .08em; margin-bottom: .35rem !important; }
.jred-lead { max-width: 720px; margin: 0 auto 1.5rem !important; font-size: 1.08rem; }
.jred-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.jred-badges span { background: #fff; border: 1px solid #cbd8eb; color: var(--jred-blue-dark); border-radius: 999px; padding: .38rem .8rem; font-weight: 700; font-size: .92rem; }
.jred-card { background: #fff; border: 1px solid var(--jred-border); border-radius: 18px; padding: clamp(1.25rem, 4vw, 2.25rem); margin: 0 0 1.5rem; box-shadow: 0 8px 28px rgba(25, 68, 142, .055); }
.jred-grid { display: grid; gap: 1rem 1.5rem; }
.jred-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jred-card ul { margin: 0; padding-left: 1.35rem; }
.jred-note { background: var(--jred-blue-light); border-left: 4px solid var(--jred-blue); padding: .9rem 1rem; margin-top: 1.25rem !important; }
.jred-summary-list { margin: 0 0 1.5rem; }
.jred-summary-list > div { display: grid; grid-template-columns: 8rem 1fr; border-bottom: 1px solid #edf0f5; padding: .65rem 0; }
.jred-summary-list dt { font-weight: 800; }
.jred-summary-list dd { margin: 0; }
.jred-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.2rem; border-radius: 10px; border: 2px solid transparent; font-weight: 800; font-size: 1rem; text-decoration: none !important; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.jred-button:hover { transform: translateY(-1px); }
.jred-button:focus-visible { outline: 3px solid rgba(25, 68, 142, .3); outline-offset: 3px; }
.jred-button:disabled { opacity: .62; cursor: wait; transform: none; }
.jred-button-primary { background: var(--jred-blue); color: #fff !important; box-shadow: 0 7px 18px rgba(25, 68, 142, .2); }
.jred-button-primary:hover { background: var(--jred-blue-dark); }
.jred-button-secondary { background: #fff; color: var(--jred-blue) !important; border-color: #b9c8dd; }
.jred-before { text-align: left; }
.jred-before .jred-button-primary { display: flex; width: min(100%, 420px); margin: 1.5rem auto .7rem; }
.jred-before.jred-started { opacity: .72; }
.jred-small { color: var(--jred-muted); font-size: .9rem; }
.jred-exam[hidden], .jred-complete[hidden] { display: none !important; }
.jred-timer { position: sticky; top: 12px; z-index: 20; display: grid; grid-template-columns: auto auto 1fr; gap: .65rem; align-items: center; background: #172033; color: #fff; border-radius: 12px; padding: .65rem 1rem; margin: 0 0 1rem; box-shadow: 0 7px 22px rgba(0,0,0,.18); }
.jred-timer strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.jred-timer #jred-save-status { justify-self: end; color: #d4dded; font-size: .82rem; }
.jred-timer.is-overtime { background: #71320a; }
.jred-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.jred-passage { background: #fbfcfe; border: 1px solid #e4e9f1; border-radius: 12px; padding: clamp(1rem, 3vw, 1.6rem); }
.jred-passage p { text-indent: 1em; }
.jred-passage p:last-child { text-indent: 0; }
.jred-label, .jred-field label { display: block; font-weight: 800; margin-bottom: .35rem; }
.jred-wrap input[type="text"], .jred-wrap input[type="email"], .jred-wrap select, .jred-wrap textarea { width: 100%; border: 1px solid #aebbd0; border-radius: 9px; background: #fff; color: var(--jred-ink); padding: .75rem .85rem; font: inherit; line-height: 1.65; }
.jred-wrap textarea { resize: vertical; }
.jred-wrap input:focus, .jred-wrap select:focus, .jred-wrap textarea:focus { outline: 3px solid rgba(25, 68, 142, .16); border-color: var(--jred-blue); }
.jred-field { margin-bottom: 1rem; }
.jred-required { color: #a51d25; font-size: .78rem; margin-left: .25rem; }
.jred-optional { color: var(--jred-muted); font-size: .78rem; margin-left: .25rem; }
.jred-count-row { display: flex; justify-content: space-between; gap: 1rem; color: var(--jred-muted); font-size: .9rem; margin-top: .45rem; }
.jred-warning { color: var(--jred-warning); font-weight: 700; font-size: .92rem; margin-top: .35rem !important; }
.jred-warning.is-ok { color: var(--jred-success); }
.jred-warning-important { border: 1px solid #e6ae74; background: #fff5e9; border-radius: 9px; padding: .8rem; }
.jred-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; margin-bottom: 1.5rem; }
.jred-check-grid label, .jred-consents label, .jred-fieldset label { display: flex; gap: .55rem; align-items: flex-start; }
.jred-wrap input[type="checkbox"], .jred-wrap input[type="radio"] { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: .35rem; accent-color: var(--jred-blue); }
.jred-fieldset { border: 1px solid var(--jred-border); border-radius: 10px; padding: 1rem; }
.jred-fieldset legend { font-weight: 800; padding: 0 .35rem; }
.jred-fieldset label + label { margin-top: .55rem; }
.jred-consents { display: grid; gap: .8rem; }
.jred-form-error { background: #fff0f0; border: 1px solid #d83f48; color: #761b22; border-radius: 9px; padding: .85rem 1rem; font-weight: 700; margin-top: 1rem; }
.jred-submit-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
.jred-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.jred-complete { text-align: center; border-color: #a8c9b6; background: #f7fcf9; }
.jred-receipt { display: inline-block; background: #fff; border: 2px solid #a8c9b6; border-radius: 10px; padding: .75rem 1.15rem; margin: .6rem 0 1.2rem; }
.jred-receipt strong { font-size: 1.18rem; letter-spacing: .04em; }
@media (max-width: 700px) {
    .jred-grid-2, .jred-check-grid { grid-template-columns: 1fr; }
    .jred-summary-list > div { grid-template-columns: 1fr; gap: .1rem; }
    .jred-section-heading { align-items: flex-start; flex-direction: column; }
    .jred-timer { top: 6px; grid-template-columns: auto auto; }
    .jred-timer #jred-save-status { grid-column: 1 / -1; justify-self: start; }
    .jred-count-row { flex-direction: column; gap: .1rem; }
    .jred-submit-actions .jred-button { width: 100%; }
}
@media print {
    .jred-timer, .jred-button, .jred-before, .jred-submit-actions { display: none !important; }
    .jred-card { box-shadow: none; break-inside: avoid; }
}
