﻿/* =========================================================
   Count Basie Fan Site
   Bibliography
   ========================================================= */


/* ---------------------------------------------------------
   Color
   --------------------------------------------------------- */

:root {
    --bg-color: #151515;
    --surface-color: #202020;
    --surface-hover: #303030;

    --text-color: #e8e8e8;
    --text-muted: #a8a8a8;

    --accent-color: #c9a96e;

    --border-color: #353535;
}


/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}


html {
    font-size: 16px;
}


body {
    margin: 0;

    background-color: var(--bg-color);
    color: var(--text-color);

    font-family:
        "Meiryo",
        "メイリオ",
        "Yu Gothic",
        "游ゴシック",
        sans-serif;

    font-weight: 500;

    line-height: 1.8;
}


/* ---------------------------------------------------------
   Header / Footer Navigation
   --------------------------------------------------------- */

.site-header,
.site-footer {
    width: 100%;

    text-align: center;
}


.site-header {
    padding: 28px 16px 20px;
}


.site-footer {
    margin-top: 60px;

    padding: 28px 16px 40px;

    border-top: 1px solid var(--border-color);
}


.site-nav {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;
    align-items: center;

    gap: 8px 14px;

    width: 100%;

    margin: 0 auto;

    text-align: center;
}


.site-nav a {
    color: var(--text-muted);

    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.2s ease;
}


.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--accent-color);

    outline: none;
}


.site-nav a.current {
    color: var(--accent-color);
}


.site-nav span {
    color: #555;

    font-size: 0.85rem;
}


/* ---------------------------------------------------------
   Main
   --------------------------------------------------------- */

.page-container {
    width: min(1000px, calc(100% - 32px));

    margin: 0 auto;
}


/* ---------------------------------------------------------
   Page Heading
   --------------------------------------------------------- */

.page-heading {
    margin: 22px 0 32px;

    text-align: center;
}


.page-heading h1 {
    margin: 0 0 16px;

    color: var(--text-color);

    font-size: clamp(1.5rem, 3vw, 2rem);

    font-weight: 700;

    line-height: 1.4;

    letter-spacing: 0.03em;
}


.page-heading .description {
    margin: 0;

    color: var(--text-muted);

    font-size: 0.85rem;

    font-weight: 500;

    line-height: 1.7;
}


/* ---------------------------------------------------------
   Table
   --------------------------------------------------------- */

.table-wrapper {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


.bibliography-table {
    width: 100%;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


/*
 * 表の罫線は表示しない。
 */

.bibliography-table th,
.bibliography-table td {
    border: 0;

    padding: 14px 12px;

    vertical-align: middle;
}


/* ---------------------------------------------------------
   Table Header
   --------------------------------------------------------- */

.bibliography-table thead th {
    color: var(--text-muted);

    font-size: 0.78rem;

    font-weight: 700;

    text-align: center;

    letter-spacing: 0.04em;
}


/* ---------------------------------------------------------
   Column Width
   --------------------------------------------------------- */

.bibliography-table .cover-column {
    width: 130px;

    text-align: center;
}


.bibliography-table .title-column {
    width: auto;

    text-align: left;
}


.bibliography-table .author-column {
    width: 220px;

    text-align: left;
}


.bibliography-table .date-column {
    width: 130px;

    text-align: center;
}


/* ---------------------------------------------------------
   Table Row
   --------------------------------------------------------- */

.bibliography-table tbody tr {
    background-color: transparent;

    cursor: pointer;

    transition:
        background-color 0.2s ease;
}


.bibliography-table tbody tr:hover {
    background-color: var(--surface-hover);
}


.bibliography-table tbody tr:focus-visible {
    background-color: var(--surface-hover);

    outline: 1px solid var(--accent-color);

    outline-offset: -1px;
}


/* ---------------------------------------------------------
   Cover
   --------------------------------------------------------- */

.bibliography-table .cover-column {
    padding-top: 12px;
    padding-bottom: 12px;
}


.bibliography-table .cover-column a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 100px;

    line-height: 0;
}


.bibliography-table .cover-column img {
    display: block;

    width: 100px;

    height: auto;

    max-width: 100%;

    object-fit: contain;

    border: 0;
}


/*
 * 縦長の書籍表紙については、
 * widthだけ100pxに固定し、
 * heightは自動。
 */

.bibliography-table .cover-column img {
    height: auto;
}


/* ---------------------------------------------------------
   Title
   --------------------------------------------------------- */

.bibliography-table .title-column a {
    display: block;

    width: 100%;

    color: var(--text-color);

    font-size: 0.95rem;

    font-weight: 600;

    line-height: 1.6;

    text-decoration: none;

    transition:
        color 0.2s ease;
}


.bibliography-table tbody tr:hover .title-column a,
.bibliography-table tbody tr:focus-visible .title-column a {
    color: var(--accent-color);
}


/* ---------------------------------------------------------
   Author
   --------------------------------------------------------- */

.bibliography-table .author-column {
    color: var(--text-color);

    font-size: 0.88rem;

    font-weight: 500;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   Publication
   --------------------------------------------------------- */

.bibliography-table .date-column {
    color: var(--text-muted);

    font-size: 0.82rem;

    font-weight: 500;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.copyright {
    margin: 18px 0 0;

    color: var(--text-muted);

    font-size: 0.72rem;

    font-weight: 500;

    line-height: 1.7;

    text-align: center;
}


/* ---------------------------------------------------------
   Smartphone
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .site-header {
        padding: 22px 12px 16px;
    }


    .site-footer {
        margin-top: 48px;

        padding: 24px 12px 32px;
    }


    .site-nav {
        gap: 6px 10px;
    }


    .site-nav a {
        font-size: 0.82rem;
    }


    .page-container {
        width: calc(100% - 20px);
    }


    .page-heading {
        margin: 18px 0 24px;
    }


    .page-heading h1 {
        font-size: 1.4rem;
    }


    .page-heading .description {
        font-size: 0.78rem;
    }


    /*
     * スマートフォンでも表形式を維持。
     *
     * 横スクロールによってカラムを保持する。
     */

    .table-wrapper {
        overflow-x: auto;
    }


    .bibliography-table {
        min-width: 700px;
    }


    .bibliography-table th,
    .bibliography-table td {
        padding: 12px 10px;
    }


    .bibliography-table .cover-column {
        width: 120px;
    }


    .bibliography-table .author-column {
        width: 190px;
    }


    .bibliography-table .date-column {
        width: 110px;
    }


    .bibliography-table .title-column a {
        font-size: 0.88rem;
    }


    .bibliography-table .author-column {
        font-size: 0.82rem;
    }


    .bibliography-table .date-column {
        font-size: 0.78rem;
    }

}


/* ---------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .site-nav a,
    .bibliography-table tbody tr,
    .bibliography-table .title-column a {
        transition: none;
    }

}
