body {
    margin: 0;
}

* {
    box-sizing: border-box;
}

/* =============================================================================
//   @    @@@@ @   @ @@@@ @  @ @@@@@
//   @    @  @ @   @ @  @ @  @   @
//   @    @  @ @@@@@ @  @ @  @   @
//   @    @@@@   @   @  @ @  @   @
//   @@@@ @  @   @   @@@@ @@@@   @
============================================================================= */
/* =============================================================================

| logo container| sponsor container | login container               |  sub  |
+---------------+-------------------+-------------------------------+-------+
|               |                   |               |               |       |
| logo content  | sponsor-banner-box| login-msg-box | login-btn-box |       |
|               |                   |               |               |       |
|               |-------------------|---------------|---------------|       |
|               |                   |                               |       |
|               | sponsor-link-box  |       login-alt-box           |       |
|               |                   |                               |       |
+---------------+-------------------+-------------------------------+-------+
|                                                                           |
|   top-navi                                                                |
|                                                                           |
+---------------------------------------------------------------------------+

============================================================================= */

/* -------------------------------------------------------------------------- */

.logo-container {
    width: 240px;
    display: block;
    padding: 2px;
}

/* -------------------------------------------------------------------------- */

.sponsor-container {
    width: 300px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    margin-right: 10px;
}

.sponsor-banner-box {
    margin: 0.125em 0;
    display: block;
    height: 36px;
}

.sponsor-alt-box {
    margin-top: 3px;
}

/* -------------------------------------------------------------------------- */

.login-container {
    width: fit-content;
    min-width: 240px;
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0 8px;
}

.login-msg-box {
    grid-area: 1 / 1 / 2 / 2;
    gap: 0.5em;
}

.login-button-box {
    grid-area: 1 / 2 / 2 / 3;
}

.login-alt-box {
    grid-area: 2 / 1 / 3 / 3;
}

/* -------------------------------------------------------------------------- */

.sub-container {
    display: none;
}

/* =============================================================================
//   @  @ @@@@ @@@@ @@@@  @@@@ @@@@
//   @  @ @    @  @  @  @ @    @  @
//   @@@@ @@@@ @  @  @  @ @@@@ @@@@
//   @  @ @    @@@@  @  @ @    @ @
//   @  @ @@@@ @  @ @@@@  @@@@ @  @
============================================================================= */

#topbar-wrapper {
    margin-block-end: 1em;
}

#topbar {
    padding-top: 2px;
    background-image: url(/images/wall/wall-gr-2.jpg);
    background-color: #fff;
    background-repeat: repeat-y;
    display: flex;
    padding-bottom: 2px;
    max-width: 1120px;
    line-height: 1;
}

#topbar a:has(img),
#topbar a:has(input[type=image]) {
    display: inline-block;
}

.topbar-alt-link {
    background-color: #cafcca;
    color: #00f !important;
    padding: 0px 3px;
    font-size: 9pt;
    letter-spacing: 0;
    text-decoration: none;
}

#topbar a:hover {
    text-decoration: underline;
}

/* -------------------------------------------- */

.logo-container img {
    margin: 0px;
    display: block;
}

/* -------------------------------------------- */

.sponsor-alt-box {
    text-align: right;
}

.sponsor-link-btn {
    display: none;
}

/* -------------------------------------------- */

.login-container {
    text-align: right;
}

.login-nav.no-logined {
    color: #777;
    font-weight: bold;
    font-size: 9.5pt;
}

.login-nav.logined {
    color: #900;
    font-weight: bold;
    font-size: 9.5pt;
}

.login-nav.alt-alert {
    color: red;
    font-weight: bold;
    font-size: 7.5pt;
    margin-top: 0.25em;
}

/* ----------------------------- */

.login-button-box {
    display: inline-block;
}

.login-button {
    vertical-align: middle;
}

/* ----------------------------- */

.login-alt-box {
    text-align: right;
    font-size: 9pt;
}


/* =============================================================================
//   @@@@@@  @@@@ @   @ @  @
//   @  @  @ @    @@  @ @  @
//   @  @  @ @@@@ @ @ @ @  @
//   @  @  @ @    @  @@ @  @
//   @  @  @ @@@@ @   @ @@@@
============================================================================= */

/* wood */
#header-wood {
    width: 100%;
    height: 5px;
    /* これ付けないとW3C準拠でスタイル崩壊 */
    display: block;
}

/* これはスマートフォン版でのみ映るボックス */
#tablet-login-status-box {
    background-color: #008000;
    text-align: center;
    display: none;
}

/* ----------------------- HEADER NAVIGATION ---------------------------- */

#top-navi {
    display: flex;
    background-color: #008000;
    min-height: 27px;
}

.top-navi-button-box {
    display: none;
}

.top-navi-accordion-opener {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    background: #393;
    color: white;
    font-weight: bold;
    font-size: 9pt;
    padding: 3px 12px;
    border-radius: 4px;
    border: 1px solid #003600;
}

/* -------------------------------------------- */

.top-navi-list {
    list-style: none;
    font-size: 8pt;
    margin: 0;
    padding: 0;
}

.top-navi-list-item {
    display: inline-block;
    padding: 0.25em 0.5em;
}

.top-navi-list-item-sub {
    vertical-align: top;
}

.top-navi-list a {
    color: white;
    text-decoration: none;
}

.top-navi-list a:hover,
.top-navi-list a:active,
.top-navi-list a:link,
.top-navi-list a:visited {
    font-family: revert;
}

.top-navi-list a:hover {
    text-decoration: underline;
}

.top-navi-list a.gotorss {
    width: 14px;
    height: 14px;
    background: url(/rss/images/ico_rss.gif) no-repeat 50% 0;
    color: transparent;
    display: block;
}

/* -------------------------------------------- */

#footer {
    background: #080;
    text-align: right;
    color: white;
    padding: 4px 13px;
    font-size: 10pt;
}


/* =============================================================================
//   @@@@ @@@@ @@@@ @@@@ @@@@ @   @ @@@@ @@@ @   @ @@@@
//   @  @ @    @    @  @ @  @ @@  @ @     @  @   @ @
//   @@@@ @@@@ @@@@ @  @ @  @ @ @ @ @@@@  @   @ @  @@@@
//   @ @  @       @ @@@@ @  @ @  @@    @  @   @ @  @
//   @  @ @@@@ @@@@ @    @@@@ @   @ @@@@ @@@   @   @@@@
============================================================================= */

@media (min-width:1120px) {

    .sub-container {
        display: block;
        justify-self: end;
        flex: 1;
        align-self: center;
        text-align: right;
    }
}

@media (max-width:899px) {

    /* ---------- 全体レイアウト -------------- */

    #topbar {
        position: relative;
        justify-content: right;
        gap: 10px;
        padding: 2px 2px 2px 0;
        min-height: 63px;
    }

    /* --------- 上部レイアウト --------------- */

    .logo-container {
        position: absolute;
        top: 0;
        left: 0;
    }

    .sponsor-container {
        display: none;
    }

    /* 賛助会員一覧ボタン */
    .sponsor-link-btn {
        display: inline-flex;
        flex-wrap: wrap;
        align-items: center;
        height: 34px;
        padding: 0 .5em;
        /* #topBar a:linkによって色設定されている */
        color: #fff !important;
        background: linear-gradient(-45deg, #00A652, #15D174);
        border-radius: 3px;
        border: 1px solid #15D174;
        text-align: center;
        font-size: 10pt;
        box-shadow: 1px 2px 2px #0003;
        text-decoration: none;
    }

    /* --------- 下部レイアウト --------------- */

    #top-navi {
        display: block;
        min-height: 0;
    }

    .top-navi-button-box {
        display: block;
    }

    /* collapse */
    .top-navi-list {
        display: none;
        flex-direction: column;
    }

    /* collapse.show */
    .top-navi-list.show {
        display: block;
    }

    #tablet-login-status-box {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        /* これは各ページ上での指定に対する対策 */
        line-height: 135%;
    }

    /* --------- 下部他デザイン --------------- */

    .top-navi-list {
        font-size: 10pt;
        border-top: 1px solid white;
    }

    .top-navi-list-item a::before {
        content: "\25E6";
    }

    /* スマートフォンレイアウトでのみ登場するログインボックス */

    #tablet-login-status-box .login-msg-box {
        padding: 0 15px;
    }

    #tablet-login-status-box .login-nav.logined,
    #tablet-login-status-box .login-nav.no-logined,
    #tablet-login-status-box a {
        color: white;
    }

    #tablet-login-status-box .login-nav.alt-alert {
        display: none;
    }

}

@media (max-width:599px) {

    #topbar {
        justify-content: space-between;
        min-height: 0;
        position: static;
    }

    /* ------ 上部レイアウト ------------------ */

    .logo-container {
        position: static;
        width: calc(100% - 180px);
    }

    .login-container {
        min-width: 0;
        gap: 0;
        align-items: flex-start;
    }

    .login-container .login-msg-box {
        display: none;
    }

    .login-container .login-alt-box {
        display: none;
    }

    /* ---------------------------------------- */

    .logo-container img {
        max-width: 100%;
        height: auto;
    }

}

/* ------- 下部 ------------------------------- */

@media (min-width:880px) and (max-width:999px) {

    .top-navi-list-item-sub {
        display: none;
    }
}

/* =============================================================================
//   @@@@ @@@@ @@@ @   @ @@@@@
//   @  @ @  @  @  @@  @   @
//   @  @ @@@@  @  @ @ @   @
//   @@@@ @ @   @  @  @@   @
//   @    @  @ @@@ @   @   @
============================================================================= */

@media print {
    #topbar-wrapper {
        display: none;
    }

    #footer-wrapper {
        display: none;
    }
}

@page {
    margin: 10mm;
    width: 210mm;
    height: 297mm;
    size: A4 portrait;
}