/* =========================
   Project LPT
   Main Style Sheet
   ========================= */

:root {
    --aki: #D00000;
    --kouichi: #FFFFFF;
    --junji: #000000;
    --tomoi: #164A7A;
    --graph-bg: #282828;
    --site-bg: #000000;
    --accent: #990000;
    --text-main: #CCCCCC;
    --text-muted: #888888;
    --border: #555555;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--site-bg);
    color: var(--text-main);
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "Hiragino Mincho Pro", serif;
    font-size: 14px;
}

.site {
    width: 100%;
    margin: 0;
    border: none;
    background-color: var(--site-bg);
}

header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

header h1 {
    margin: 0;
    color: var(--kouichi);
    font-family: "Cormorant Garamond", "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "Times New Roman", serif;
    font-size: 48px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 5px;
}

.site-subtitle {
    margin: 8px 0 0;
    color: var(--accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    letter-spacing: 2px;
}

.layout {
    display: flex;
    align-items: stretch;
}

.menu {
    width: 180px;
    flex-shrink: 0;
    padding: 20px;
    border-right: 1px solid var(--border);
    background-color: var(--site-bg);
    box-sizing: border-box;
}

.menu h2 {
    margin: 0 0 20px;
    color: var(--accent);
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    letter-spacing: 3px;
}

.menu > a {
    display: block;
    margin: 15px 0;
    color: var(--accent);
    text-decoration: none;
}

.menu > a:visited {
    color: var(--accent);
}

.menu > a:hover {
    color: var(--kouichi);
    text-decoration: underline;
}

.menu h3 {
    margin: 25px 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 2px;
}

.menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu li {
    margin: 7px 0;
    padding-left: 12px;
    position: relative;
}

.menu li::before {
    content: "├";
    position: absolute;
    left: 0;
    color: var(--border);
}

.menu li:last-child::before {
    content: "└";
}

.menu li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
}

.menu li a:visited {
    color: #999999;
}

.menu li a:hover {
    color: var(--kouichi);
    text-decoration: underline;
}

.content {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 500px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* 右側の「昔風フレーム」 */
.content-frame {
    display: block;
    width: 100%;
    height: 1500px;
    min-height: 800px;
    border: 0;
    margin: 0;
    padding: 0;
    background: var(--site-bg);
}

.frame-page {
    margin: 0;
    padding: 0;
    background: var(--site-bg);
    color: var(--text-main);
}

.frame-content {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 40px 60px;
    box-sizing: border-box;
}

.frame-content h2 {
    color: var(--kouichi);
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 2px;
}

.frame-content h3 {
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-top: 42px;
}

.frame-content p {
    line-height: 1.9;
}

.analysis-page {
    line-height: 1.9;
}

.figure {
    margin: 35px auto 45px;
    text-align: center;
    max-width: 900px;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.figure figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: left;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 25px 0 35px;
}

table.analysis-table {
    width: 760px;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
    background: #050505;
}

table.analysis-table th,
table.analysis-table td {
    border: 1px solid var(--border);
    padding: 8px 7px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

table.analysis-table th {
    background: #1a1a1a;
    color: var(--kouichi);
    white-space: nowrap;
}

table.analysis-table td:first-child,
table.analysis-table th:first-child {
    width: 42px;
    text-align: center;
}

table.analysis-table td:nth-child(2),
table.analysis-table th:nth-child(2) {
    width: 92px;
}

table.analysis-table td:nth-child(3),
table.analysis-table th:nth-child(3) {
    width: 75px;
    text-align: center;
}

table.table1 td:nth-child(2),
table.table1 th:nth-child(2) {
    width: 360px;
}

table.table1 td:nth-child(n+3),
table.table1 th:nth-child(n+3) {
    width: 80px;
    text-align: center;
}

table.table2 td:nth-child(4),
table.table2 th:nth-child(4) {
    width: 300px;
}

table.table2 td:nth-child(5),
table.table2 th:nth-child(5),
table.table2 td:nth-child(6),
table.table2 th:nth-child(6) {
    width: 90px;
    text-align: center;
}

table.analysis-table tr.total {
    font-weight: bold;
    background: #111111;
}

.note {
    color: var(--text-muted);
    font-size: 13px;
    border-left: 3px solid var(--border);
    padding-left: 12px;
    margin: 15px auto 30px;
    max-width: 900px;
    line-height: 1.8;
}

.data-source {
    margin: 40px auto 0;
    padding: 18px;
    border: 1px solid var(--border);
    background: #080808;
    max-width: 900px;
    box-sizing: border-box;
}

.data-source h3 {
    border-left: none;
    padding-left: 0;
    margin-top: 0;
}

.data-source ul {
    padding-left: 22px;
    line-height: 1.8;
}

.welcome {
    margin: 30px 0;
    color: var(--kouichi);
    font-size: 18px;
    text-align: center;
}

.counter {
    margin: 30px 0;
    text-align: center;
}

.counter-display {
    margin: 10px 0;
}

.news {
    margin: 30px 0;
}

.news h3 {
    color: var(--accent);
    text-align: center;
    border-left: none;
}

.new {
    color: var(--aki);
    font-weight: bold;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.last-update {
    text-align: right;
    color: var(--text-muted);
    font-family: "Courier New", monospace;
}

hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px dotted var(--border);
}

.graph,
.chart,
.chart-container {
    background-color: var(--graph-bg);
}

.member-aki { color: var(--aki); }
.member-Kouichi { color: var(--kouichi); }
.member-Junji { color: var(--junji); }
.member-Tomoi { color: var(--tomoi); }

.bg-aki { background-color: var(--aki); }
.bg-kouichi { background-color: var(--kouichi); color: var(--junji); }
.bg-junji { background-color: var(--junji); color: var(--kouichi); }
.bg-tomoi { background-color: var(--tomoi); }

.external-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.link-banner {
    max-width: 180px;
    height: auto;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-family: "Courier New", monospace;
}

.text-link:hover {
    color: var(--kouichi);
    text-decoration: underline;
}

footer {
    padding: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 11px;
    text-align: center;
}

footer p {
    margin: 8px 0;
}


/* =========================================================
   管理人欄
   ========================================================= */

.manager {
    text-align: center;
    border-left: none !important;
    padding-left: 0 !important;
}

/* 管理人 */
.frame-content .manager h2 {
    font-size: 20px !important;
    margin: 0 0 20px;
    padding: 0 !important;
    border-left: none !important;
}

/* みょん */
.frame-content .manager .manager-name {
    font-size: 17px !important;
    font-weight: normal;
    margin: 0 0 12px;
}

/* みょんのリンク */
.frame-content .manager .manager-name a {
    color: var(--text-main);
    font-size: inherit;
    font-weight: normal;
    text-decoration: none;
}

/* Project LPT 管理人 */
.frame-content .manager div:last-child {
    font-size: 15px !important;
}


/* =========================================================
   スマートフォン / タブレット
   1024px以下
   ・PC用左MENUは完全に非表示
   ・プルダウンMENUのみ表示
   ========================================================= */

.mobile-menu {
    display: none;
}

@media screen and (max-width: 1024px) {

    html,
    body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    body {
        padding: 0;
        font-size: 14px;
    }

    .site {
        width: 100%;
        margin: 0;
        border: none;
    }

    header {
        padding: 16px 12px 14px;
    }

    header h1 {
        font-size: 34px;
        letter-spacing: 3px;
        white-space: nowrap;
    }

    .site-subtitle {
        font-size: 12px;
        letter-spacing: 1px;
    }

    /* レイアウトを縦型へ */
    .layout {
        display: block;
    }

    /* PC用左MENUはスマホでは完全に消す */
    .menu {
        display: none;
    }

    /* スマホ用プルダウンMENUのみ表示 */
    .mobile-menu {
        display: block;
        width: 100%;
        padding: 12px 16px;
        box-sizing: border-box;
        background: var(--site-bg);
        border-bottom: 1px solid var(--border);
    }

    .mobile-menu select {
        display: block;
        width: 100%;
        padding: 11px 12px;
        box-sizing: border-box;
        background: #111111;
        color: var(--text-main);
        border: 1px solid var(--border);
        border-radius: 0;
        font-family:
            "Hiragino Mincho ProN",
            "Hiragino Mincho Pro",
            "Yu Mincho",
            "YuMincho",
            serif;
        font-size: 16px;
    }

    .mobile-menu option,
    .mobile-menu optgroup {
        background: #111111;
        color: #FFFFFF;
    }

    .content {
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 0;
        overflow: visible;
    }

    .content-frame {
        width: 100%;
        height: auto;
        min-height: 1000px;
        overflow: visible;
    }

    .frame-content {
        width: 100%;
        max-width: none;
        padding: 24px 16px 50px;
        box-sizing: border-box;
    }

    .frame-content h2 {
        font-size: 22px;
        letter-spacing: 1px;
        line-height: 1.5;
    }

    .frame-content h3 {
        margin-top: 30px;
        padding-left: 9px;
        font-size: 17px;
    }

    .frame-content p {
        line-height: 1.85;
    }

    .analysis-page {
        line-height: 1.85;
    }

    .figure {
        width: 100%;
        margin: 25px auto 35px;
    }

    .figure img {
        width: 100%;
        height: auto;
    }

    .figure figcaption {
        font-size: 12px;
        line-height: 1.6;
    }

    /* 表は横スクロール */
    .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.analysis-table {
        width: 760px;
        max-width: none;
        font-size: 12px;
    }

    .note,
    .data-source {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    .data-source {
        padding: 14px;
    }

    .external-links {
        gap: 10px;
        padding: 0 10px;
    }

    .link-banner {
        max-width: 150px;
    }

    footer {
        padding: 12px 8px;
    }

    .last-update {
        font-size: 11px;
    }
}
