:root {
    --ink: #17212b;
    --muted: #687582;
    --line: #dfe5ea;
    --soft: #f4f7f9;
    --navy: #17324d;
    --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.75;
}
a { color: inherit; }
.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
}
.header-inner, .section-inner, .hero-inner, .footer-inner {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
}
.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; }
.brand-mark {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 11px;
    background: var(--navy); color: #fff;
    font-size: 19px;
}
.brand-text { font-size: 17px; letter-spacing: .02em; }
.header-note { color: var(--muted); font-size: 13px; }
.hero {
    padding: 88px 0 78px;
    background: linear-gradient(180deg, #f6f9fb 0%, #fff 100%);
    border-bottom: 1px solid #edf1f4;
}
.hero-inner { max-width: 920px; text-align: center; }
.eyebrow, .section-kicker {
    margin: 0 0 12px;
    color: #52708a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
}
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.35; letter-spacing: -.03em; }
.lead { margin: 26px auto 0; max-width: 760px; color: #4c5b68; font-size: 17px; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 28px; }
.hero-points span {
    padding: 7px 13px;
    border: 1px solid #d8e1e8;
    border-radius: 999px;
    background: #fff;
    color: #4f6272;
    font-size: 13px;
    font-weight: 700;
}
.subjects-section { padding: 74px 0 88px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.35; letter-spacing: -.025em; }
.subject-count { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.subject-card {
    --accent: #526b7b;
    --accent-soft: #edf2f5;
    min-width: 0;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--accent);
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(23,50,77,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.subject-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(23,50,77,.10); border-color: #cbd6df; }
a.subject-card:focus-visible { outline: 3px solid #91b5d0; outline-offset: 4px; }
.theme-history { --accent: #9a4c48; --accent-soft: #f8eeee; }
.theme-geography { --accent: #397259; --accent-soft: #edf6f1; }
.theme-science { --accent: #3d638c; --accent-soft: #edf3f8; }
.theme-default { --accent: #685a8b; --accent-soft: #f2eff8; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.subject-mark {
    display: grid; place-items: center;
    width: 58px; height: 58px;
    border-radius: 17px;
    background: var(--accent-soft); color: var(--accent);
    font-size: 25px; font-weight: 900;
}
.grade-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.card-body { margin-top: 27px; }
.card-body h3 { margin: 0; font-size: 28px; line-height: 1.3; }
.card-title { margin: 10px 0 0; min-height: 58px; font-size: 16px; font-weight: 800; line-height: 1.7; }
.card-description { margin: 14px 0 0; color: #5f6e7a; font-size: 14px; }
.card-footer {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid #edf0f2;
    display: flex; flex-direction: column; gap: 10px;
}
.card-meta { color: var(--muted); font-size: 12px; }
.go-label { color: var(--accent); font-size: 14px; font-weight: 800; }
.coming-label { color: var(--muted); font-size: 13px; font-weight: 800; }
.is-disabled { opacity: .6; box-shadow: none; }
.concept-section { padding: 82px 0 96px; background: var(--soft); border-top: 1px solid #e8edf1; }
.concept-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: start; }
.concept-list { border-top: 1px solid #d5dde3; }
.concept-item { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid #d5dde3; }
.concept-number { color: #7890a1; font-size: 12px; font-weight: 900; letter-spacing: .08em; padding-top: 5px; }
.concept-item h3 { margin: 0; font-size: 18px; }
.concept-item p { margin: 5px 0 0; color: #5e6d78; font-size: 14px; }
.site-footer { padding: 34px 0; background: #17212b; color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.footer-inner p { margin: 0; font-size: 12px; color: #bdc6cd; }
.footer-inner .footer-brand { color: #fff; font-size: 14px; font-weight: 800; }
.sp-only { display: none; }
@media (max-width: 900px) {
    .subject-grid { grid-template-columns: 1fr 1fr; }
    .concept-grid { grid-template-columns: 1fr; gap: 35px; }
}
@media (max-width: 640px) {
    .header-inner, .section-inner, .hero-inner, .footer-inner { width: min(calc(100% - 28px), var(--max)); }
    .header-inner { min-height: 62px; }
    .header-note { display: none; }
    .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
    .brand-text { font-size: 15px; }
    .hero { padding: 58px 0 52px; }
    h1 { font-size: 26px; line-height: 1.35; }
    .lead { margin-top: 20px; font-size: 15px; text-align: left; }
    .lead br { display: none; }
    .hero-points { justify-content: flex-start; }
    .sp-only { display: block; }
    .subjects-section { padding: 52px 0 66px; }
    .section-heading { align-items: start; flex-direction: column; gap: 8px; margin-bottom: 22px; }
    .subject-grid { grid-template-columns: 1fr; gap: 15px; }
    .subject-card { min-height: 0; padding: 20px; border-radius: 15px; }
    .subject-mark { width: 50px; height: 50px; border-radius: 14px; font-size: 22px; }
    .card-body { margin-top: 20px; }
    .card-body h3 { font-size: 25px; }
    .card-title { min-height: 0; font-size: 15px; }
    .card-footer { margin-top: 20px; }
    .concept-section { padding: 58px 0 65px; }
    .concept-item { grid-template-columns: 38px 1fr; gap: 12px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
