/*
 * サイト共通パーツ（全ページで読み込む）
 * 各ツールは配色がばらばらなので、色は currentColor から作り、どの背景でもなじむようにしている。
 */
[hidden] {
    display: none !important;
}

.series-footer {
    width: 100%;
    max-width: 640px;
    margin: 48px auto 0;
    padding: 24px 16px 32px;
    border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.series-footer .series-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.series-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.series-footer li a {
    display: block;
    height: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s;
}

.series-footer li a:hover,
.series-footer li a:focus-visible {
    background: color-mix(in srgb, currentColor 7%, transparent);
    text-decoration: none;
}

.series-footer li a[aria-current="page"] {
    border-color: color-mix(in srgb, currentColor 40%, transparent);
}

/* 親ツールと、その中のページ（単語リスト変換・表現解説）は1枚のカードにまとめる */
.series-footer li.series-group {
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    border-radius: 10px;
    overflow: hidden;
}

.series-footer li.series-group a {
    height: auto;
    border: 0;
    border-radius: 0;
}

.series-footer li.series-group a[aria-current="page"] {
    background: color-mix(in srgb, currentColor 7%, transparent);
}

.series-footer .series-child {
    padding-top: 8px;
    border-top: 1px dashed color-mix(in srgb, currentColor 18%, transparent) !important;
}

.series-footer .series-child .series-name::before {
    content: '└ ';
    opacity: 0.5;
}

.series-footer .series-name {
    display: block;
    font-weight: 700;
}

.series-footer .series-desc {
    display: block;
    font-size: 12px;
    opacity: 0.7;
}

.series-footer .series-copy {
    margin: 16px 0 0;
    font-size: 11px;
    opacity: 0.55;
    text-align: center;
}

.series-footer .series-copy a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 全ページ共通の上部ナビ（ビルド時に <body> の直後へ入る）。
   背景を持たず、文字色はページから受け継ぐので、どのツールの配色にもなじむ。
   横に収まらないときは横スクロール。 */
.site-bar {
    box-sizing: border-box;
    width: 100%;
    flex: none;
    align-self: stretch;
    padding: 0 16px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Segoe UI', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-bar::-webkit-scrollbar {
    display: none;
}

.site-bar ul {
    display: flex;
    align-items: stretch;
    gap: 22px;
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.site-bar li {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.site-bar a {
    display: flex;
    align-items: center;
    height: 42px;
    box-sizing: border-box;
    border-bottom: 2px solid transparent;
    color: inherit;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.site-bar a:hover,
.site-bar a:focus-visible {
    opacity: 1;
    text-decoration: none;
}

.site-bar a[aria-current="page"] {
    opacity: 1;
    font-weight: 700;
    border-bottom-color: currentColor;
}

/* 「表現解説」は Read the Room の中のページ。親のすぐ右に、小さく、区切り線をはさんで置く */
.site-bar-child {
    margin-left: 10px;
    font-size: 11.5px;
    letter-spacing: 0.02em;
}

.site-bar-child::before {
    content: '';
    width: 1px;
    height: 11px;
    margin-right: 10px;
    background: currentColor;
    opacity: 0.45;
}

/* 学習中は本文に場所を譲る */
body.studying .site-bar {
    display: none;
}
