/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #eef1f3 url("https://data-field.jp/assets/img/28733509_s-1.jpg") center top / cover fixed;
    color: #303944;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.7;
}
a { color: #20649b; }

/* Header */
.site-header {
    width: 100%;
    margin: auto;
    padding: 18px 16px 15px;
    text-align: center;
    position: relative;
    border-top: 6px solid #285b92;
    background: #303030;
}
.site-logo {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.logo-title { font-size: clamp(36px, 5vw, 58px); font-weight: 900; letter-spacing: .025em; line-height: 1.2; }
.logo-subtitle { order: 0; color: #fff; font-size: 14px; letter-spacing: 0; text-transform: none; }
.logo-image { order: 1; display: block; width: min(340px, 85vw); max-width: 100%; height: auto; }

/* Page layout */
.page-shell {
    max-width: 1160px;
    margin: 6px auto 30px;
    padding: 30px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 6px 26px #26384917;
}
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
.content { min-width: 0; }
.content h1 { font-size: 25px; border-bottom: 3px solid #3281ad; padding-bottom: 12px; margin: 0 0 20px; }
.intro { text-align: center; font-weight: 700; font-size: 19px; padding: 22px 12px 30px; margin: 0 0 28px; border-bottom: 1px solid #dce4ea; }
.intro span { font-size: 15px; color: #447b9b; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.eyebrow { font-size: 11px; letter-spacing: .18em; color: #7b95a8; font-weight: 700; margin: 0; }
.section-heading h2 { font-size: 24px; margin: 0; }
.team-count { font-size: 13px; color: #72808c; }

/* Search */
.search-row { display: flex; gap: 8px; margin-bottom: 6px; }
.search-row input { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid #c9d4dd; border-radius: 5px; font: inherit; }
.search-row button { white-space: nowrap; background: #edf4f9; border: 1px solid #c9d4dd; border-radius: 5px; color: #326e97; padding: 0 14px; cursor: pointer; }
.search-status { min-height: 20px; font-size: 12px; color: #788895; margin: 6px 0 15px; }

/* Team groups and buttons */
.team-group { margin-bottom: 24px; }
.team-group[hidden] { display: none; }
.team-group-title {
    margin: 0 0 12px;
    padding: 5px 12px;
    border: 1px solid #d3dce3;
    border-radius: 4px;
    background: #f5f7f9;
    color: #354b5e;
    font-size: 15px;
    font-weight: 700;
}
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.team-link {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid #414850;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    background: #414850;
    font-size: 16px;
    font-weight: 700;
    overflow-wrap: anywhere;
    transition: background .15s;
}
.team-link:hover, .team-link:focus-visible { background: #303840; color: #fff; }
.team-link[hidden] { display: none; }

/* Sidebar */
.side-box { border: 1px solid #e1e7ec; padding: 16px; margin-bottom: 22px; }
.side-box h2 { font-size: 17px; margin: 0 0 15px; padding-bottom: 8px; border-bottom: 2px solid #e7edf1; }
.ad-placeholder { height: 250px; background: #f1f3f5; border: 1px dashed #c9d1d7; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8996a0; font-size: 14px; }
.ad-placeholder small { font-size: 12px; }
.social-link { display: inline-block; border: 1px solid #d7e0e7; border-radius: 20px; padding: 8px 15px; text-decoration: none; font-weight: 700; color: #253e52; }
.side-note { font-size: 13px; color: #73818d; }

/* Footer */
.site-footer {
    position: relative;
    background: #303030;
    border-bottom: 5px solid #285b92;
    color: #fff;
    padding: 14px max(16px, calc((100% - 1160px) / 2)) 18px;
    text-align: left;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 65px; }
.footer-inner img { display: block; width: 190px; max-width: 100%; height: auto; }
.footer-inner span { color: #fff; font-size: 14px; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 900px) {
    .columns { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
    .side-box { margin: 0; }
    .page-shell { margin: 6px 12px 24px; padding: 22px; }
}
@media (max-width: 560px) {
    body { background-attachment: scroll; }
    .site-header { padding: 14px 12px; }
    .logo-image { width: min(300px, 85vw); }
    .page-shell { padding: 17px; }
    .content h1 { font-size: 21px; }
    .intro { font-size: 16px; padding: 15px 0 24px; }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar { grid-template-columns: 1fr; }
    .section-heading h2 { font-size: 21px; }
    .footer-inner { flex-direction: column; gap: 8px; }
    .site-footer { text-align: center; }
    .footer-inner img { width: 170px; }
}

/* Directory sort and latest year */
.directory-controls { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 14px; }
.directory-controls select { border: 1px solid #c9d4dd; border-radius: 5px; padding: 7px 10px; font: inherit; color: #303944; background: #fff; }
/* Keep long team names inside cards, with the year on the bottom right. */
.team-link {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    letter-spacing: normal;
}
.team-link > span:first-child {
    display: block;
    min-width: 0;
    line-height: 1.45;
    letter-spacing: normal;
}
.team-link-year {
    display: block;
    align-self: flex-end;
    flex-shrink: 0;
    margin-left: 0;
    font-size: 12px;
    font-weight: 400;
    color: #d9e4eb;
    white-space: nowrap;
}

/* Compact team directory cards */
.team-link > span:first-child {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
    letter-spacing: 0;
}
.team-link-year {
    font-size: 11px;
    line-height: 1.3;
}
@media (max-width: 560px) {
    .team-link { padding: 9px 8px; gap: 6px; }
    .team-link > span:first-child { font-size: 13px; }
    .team-link-year { font-size: 10px; }
}
/* サイドバー広告 */
.side-ad {
    width: 100%;
    min-width: 0;
    margin-bottom: 22px;
}

.side-ad a,
.side-ad img {
    max-width: 100%;
}

.side-ad img {
    display: block;
    height: auto;
}

.side-ad img[width="1"] {
    width: 1px;
    height: 1px;
}

/* スマホのみ公式Xリンクを表示 */
.mobile-official-link {
    display: none;
}

.official-link {
    display: inline-block;
    border: 1px solid #d7e0e7;
    border-radius: 20px;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: 700;
    color: #253e52;
}

@media (max-width: 900px) {
    .mobile-official-link {
        display: block;
        margin: 0 0 20px;
    }

    .sidebar {
        display: none;
    }
}