
@import url('https://fonts.googleapis.com/css2?family=Lexend+Giga:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=MuseoModerno:ital,wght@0,100..900;1,100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

@media (prefers-color-scheme: dark) {
    
    :root {
        --c-font: rgba(230,230,230,0.95);
        --c-base: rgb(20,20,20);
    }
    
}

:root {
    
    /* 基本 */
    --c-base: rgb(250,250,250);
    
    --c-font: rgb(64,64,64);
    --c-font-b: rgb(80,80,80);

    --c-link: rgb(0,112,224);
    --c-link-on: #fff;
    --c-link-sub: rgba(0,112,224,1);
    --c-hover: rgb(0,160,250);
    
    /* 無彩色 */
    --c-bgc: rgba(170,170,170,0.35);
    --c-border: rgba(128,128,128,0.5);

    --c-lt-gray: rgba(160,160,160,0.5);
    --c-gray: rgba(128,128,128,0.5);
    --c-dk-gray: rgba(96,96,96,0.8);
    
    /* アイコン関係 */
    --c-icon: rgb(128,128,128);
    --c-icon-bg: rgb(128,128,128,0.7);

}

/* フォント設定 */

body, table {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

main h2 {
    font-family: "MuseoModerno", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    letter-spacing: 0;
    font-style: normal;
    margin: 15px 0 20px;
    font-size: 3em;
    color: var(--c-gray);
}

textarea, pre, code,
input[type=text],
input[type=number],
input[type=tel],
input[type=email],
input[type=url],
input[type=password],
input[type=search] {
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}


/* スクロールバー */

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--c-lt-gray);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: var(--c-hover);
}


/* 共通設定 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: .1s;
}
:hover {
    transition: .2s;
}

body {
    text-align: left;
    text-decoration: none;
    list-style: none;
    line-height: 1.5em;
    letter-spacing: 0.05em;
    font-size: 0.93em;
    color: var(--c-font);
    background: var(--c-base);
}

a {
    color: var(--c-link);
}
a:hover {
    color: var(--c-hover);
    text-decoration: none;
}

b,em,strong {
    color: var(--c-font-b);
}
em {
    font-weight: 700;
}
strong {
    font-weight: 800;
}

small {
    line-height: 1.3em;
}

code {
    margin: 0 5px;
    padding: 0.12em 0.5em 0.2em;
    font-size: 0.9em;
    border-radius: 5px;
    border: 1px solid var(--c-border);
    background: #fff;
}
pre {
    color: #fff;
    background: #000;
}
pre code {
    border: none;
    background: none;
}

h3 {
    margin: 10px 0 8px;
    font-size: 0.95em;
}
h4 {
    margin: 15px 0 3px;
}

h5 {
    display: inline-block;
    margin: 10px 5px 3px;
    font-size: 1em;
}

dt {
    font-weight: 500;
}

p, li {
    line-height: 1.6em;
}

table {
    margin: 6px 10px;
    border-spacing: 10px 6px;
    font-size: 1em;
}

ul, ol {
    margin: 0 10px 5px;
    margin-left: 35px;
}
ul ul, ul ol,
ol ol, ol ul {
    margin: 0;
    margin-left: 25px;
}
li {
    padding-top: 3px;
    padding-left: 3px;
}

button, textarea,
input[type=button],
input[type=submit],
input[type=reset],
input[type=text],
input[type=number],
input[type=tel],
input[type=email],
input[type=url],
input[type=password],
input[type=search] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    border-radius: 5px;
    outline-color: var(--c-link);
    box-shadow: none;
    background: var(--c-base);
    background: rgb(240,240,240);
}

input[type=text],
input[type=number],
input[type=tel],
input[type=email],
input[type=url],
input[type=password],
input[type=search] {
    height: 2.5em;
    line-height: 2em;
    padding-left: 10px;
    border: 1px solid var(--c-border);
}
textarea {
    resize: vertical;
    min-width: 100%;
    min-height: 10em;
    max-height: 90vh;
    margin-top: 0.5em;
    padding: 10px 13px;
    line-height: 1.7em;
    letter-spacing: 0.05em;
    border: 1px solid var(--c-border);
}

button,
input[type=button],
input[type=submit],
input[type=reset] {
    height: 2.5em;
    margin-top: 7px;
    line-height: 2em;
    font-weight: bold;
    color: var(--c-link-on);
    background: var(--c-link);
}

button:hover,
input[type=button]:hover,
input[type=submit]:hover,
input[type=reset]:hover {
    cursor: pointer;
    background: var(--c-hover);
}

header,
header nav,
aside {
    background-image: url("img/header_bgi.png");
    background-size: 46px auto;
    background-position: top center;
}


/* 独自タグ */

.flex,
.flex_full,
.clm2,
.clm3,
.clm4 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.flex_full > * {
    flex: 1;
}
.clm2 > * {
    flex: 1 0 calc( 50% - 10px );
}
.clm3 > * {
    flex: 1 0 calc( 33.3% - 10px );
}
.clm4 > * {
    flex: 1 0 calc( 20% - 10px );
}

.left `{
    text-align: left;
}
.right {
    text-align: right;
}
.center `{
    text-align: center;
}

.note {
    display: block;
    margin: 10px;
    padding: 10px;
    text-decoration: none;
    color: red;
    border: 3px solid red;
    background: #fff;
}
.note p:first-child {
    font-weight: bold;
}
.note:hover {
    opacity: 0.5;
    color: red;
}
.box {
    padding: 10px 15px;
}

.line {
    border-left: 4px solid var(--c-link);
}

.tag_note {
    margin: 0;
    padding: 5px 10px;
    line-height: 1.6em;
    letter-spacing: 0.02em;
    font-size: 0.95em;
    
    div {
        display: flex;
        align-items: flex-start;
    }
    
    dt {
        flex: 0 0 7em;
        position: relative;
        padding: 2px 5px;
        text-align: center;
        transform: scaleX(0.9);
        transform-origin: left;
    }
    
}

.ss {
    line-height: 1.6em;
    font-size: 0.9em;
}


/* アイコン */

.mk_ex,
.mk_q,
.mk_i,
.mk_str,
.mk_x,
.mk_sc,
.mk_code,
.mk_dl,
.mk_play {
    position: relative;
    margin-left: 2.2em;
}

.mk_ex::before,
.mk_q::before,
.mk_i::before,
.mk_str::before,
.mk_x::before,
.mk_sc::before,
.mk_sc::after,
.mk_code::before,
.mk_dl::before,
.mk_play::before {
    content: "";
    display: block;
    position: absolute;
    margin: auto;
    text-align: center;
}

.mk_ex::before,
.mk_q::before,
.mk_i::before,
.mk_str::before,
.mk_x::before {
    width: 1.22em;
    height: 1.22em;
    top: 0.2em;
    left: -1.8em;
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1.23em;
    letter-spacing: 0;
    border-radius: 50px;
    color: #fff;
    background: var(--c-icon-bg);
}
.mk_ex::before {
    content: "!";
    background: rgb(255,128,96);
}
.mk_q::before {
    content: "?";
}
.mk_i::before {
    content: "i";
    background: rgb(96,180,255);
}
.mk_str::before {
    content: "★";
    background: rgb(255,180,96);
}
.mk_x::before {
    content: "×";
    background: rgb(255,0,0);
}

.mk_dl,
.mk_code,
.mk_play {
    margin-top: 1px;
}
.mk_dl::before,
.mk_code::before,
.mk_play::before {
    display: inline-block;
    position: absolute;
    top: 0;
    left: -1.4em;
    bottom: 0;
    width: 1.6em;
    height: 1.6em;
    background-size: 1.6em;
    background-repeat: no-repeat;
    background-position: center;
}
.mk_dl::before {
    background-image: url('img/icon_dl.png');
}
.mk_code::before {
    background-image: url('img/icon_code.png');
}
.mk_play::before {
    background-image: url('img/icon_play.png');
}

/*
.mk_code::before {
    content: "{}";
    top: 0.7em;
    left: 0.15em;
    bottom: 0;
    line-height: 1em;
    letter-spacing: 0.4em;
    font-size: 1.1em;
    font-weight: 600;
    transform: scaley(0.9);
}
.mk_dl::before {
    content: "↓";
    width: 14px;
    height: 8px;
    top: 0.1em;
    bottom: 0;
    left: -0.1em;
    font-size: 1.6em;
    font-weight: 600;
    line-height: 0;
    border-left: 2px solid var(--c-icon);
    border-right: 2px solid var(--c-icon);
    border-bottom: 2px solid var(--c-icon);
}
.mk_play::before {
    content: "△";
    text-shadow: 0.03em 0 0 #fff, -0.03em 0 0 #fff, 0 0.03em 0 #fff, 0 -0.03em 0 #fff, 0 0.08em 0 #fff, 0 -0.05em 0 #fff;
    font-weight: 900;
    transform: rotate(90deg);
}

.mk_code::before,
.mk_dl::before,
.mk_play::before {
    color: #fff;
    border-color: #fff;
}

.mk_sc::before {
    width: 0.5em;
    height: 0.5em;
    top: 0.2em;
    left: -1.7em;
    border: 3px solid var(--c-icon);
    border-radius: 50px;
}
.mk_sc::after {
    width: 0.5em;
    height: 0.2em;
    top: 1em;
    left: calc(-1.8em + 10px);
    border-radius: 5px;
    background: var(--c-icon);
    transform: rotate(45deg);
}
*/


.tmb {
    position: relative;
}

.tmb_pc,
.tmb_sp {
    position: relative;
    display: inline-block;
    background-size: 100%;
    border: 1px solid var(--c-border);
}
.tmb_pc::after,
.tmb_sp::after {
    position: absolute;
    left: 0;
    bottom: 5px;
    padding: 3px 8px;
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    background: rgba(32,32,32,0.5);
}
.tmb_pc::after {
    content: "PC･Pad";
}
.tmb_sp::after {
    content: "SP";
}
.tmb_pc:hover::after,
.tmb_sp:hover::after {
    opacity: 0.5;
}

.tmb_pc:hover,
.tmb_sp:hover {
    border-color: var(--c-link);
    outline: 2px solid var(--c-link);
}
#contents {

    .tmb_pc:hover::before,
    .tmb_sp:hover::before {
        content: "";
        display: block;
        width: 1.9em;
        height: 1.9em;
        background-image: url("img/icon_search.png");
        background-size: 1.3em;
        background-position: 3px;
        background-repeat: no-repeat;
        background-color: var(--c-link);
    }
    .tmb_pc:hover::before {
        border-radius: 4px 0 8px 0;
    }
    .tmb_sp:hover::before {
        border-radius: 6px 0 8px 0;
    }

}

.tmb_pc {
    width: 100%;
    border-radius: 5px;
}
.tmb_pc:hover {
    opacity: 0.7;
}
.tmb_sp {
    position: absolute;
    bottom: 2px;
    right: 0;
    border-radius: 10px;
    box-shadow: 0 0 5px var(--c-base);
    z-index: 2;
}

.link,
.info {
    display: flex;
    margin: 5px 0 6px;
    list-style: none;
    text-align: center;
}
.link {
    gap: 5px;
    font-weight: 700;
}
.link li {
    flex: 1;
    border-radius: 5px;
    background: var(--c-link);
}
.link a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #fff;
}
.link li:hover {
    background: var(--c-hover);
}

.info {
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    gap: 6px 0;
    font-size: 0.9em;
}

.tag,
.tag_b {
    display: block;
    margin: 0 3px 0 2px;
    padding: 5px 8px;
    line-height: 1em;
    letter-spacing: 0.02em;
    border-radius: 5px;
    background-color: rgba(216,216,216,0.5);
}
.tag_b {
    color: #fff;
    background-color: rgba(96,96,96,0.7);
}

.rgb,
.rgb_b,
.rgb_w {
    width: 20px;
    height: 20px;
    margin-right: 3px;
    padding: 0;
    border: none;
    border-radius: 100px;
    font-size: 0.1em;
    color: #fff0;
}
.rgb_b,
.rgb_w {
}
.rgb_b {
    border: 1px solid rgba(128,128,128,0.5);
}
.rgb_w {
    width: 21px;
    height: 21px;
    border: 1px solid rgba(128,128,128,0.7);
}


/* まとめて設定 */

.tmb_pc,
.tmb_sp,
.rgb,
.rgb_b,
.rgb_w {
    user-select: none;
    -webkit-user-select: none;
}

main h3,
.box,
.tag_note dt {
    border-radius: 5px;
    background: var(--c-bgc);
}
main h3 {
    padding: 3px 10px;
}


#contents {
    margin-top: 30px;
}
#contents h3 {
    margin: 2px 0 7px;
    padding: 0;
    font-size: 1em;
    line-height: 1.6em;
    background: none;
}
#contents h3 span {
    margin-right: 0.5em;
    padding: 2px 5px;
    font-weight: normal;
    color: #fff;
    border-radius: 5px;
    background: #888;
}
#contents article {
    margin-bottom: 25px;
}

#contents > article {
    position: relative;
}

header hgroup {
    display: flex;
    align-items: center;
}
header {
    padding: 10px 20px;
    letter-spacing: 0.05em;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 5;
}
header h1 {
    display: inline-block;
    margin-right: 15px;
    letter-spacing: -0.03em;
    font-weight: 500;
    font-style: normal;
    font-size: 2.3em;
    width: 135px;
    height: 32px;
    color: #fff0;
    background-image: url("img/header_logo.png"); 
    background-size: 100%;
    background-position: center bottom;
    background-repeat: no-repeat;
}
header h1:hover {
    opacity: 0.6;
}

header nav a {
    opacity: 0.7;
    margin: 7px 4px;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    color: var(--c-link-on);
    background: var(--c-dk-gray);
}
header nav a:hover {
    opacity: 1;
    color: var(--c-link-on);
    background: var(--c-hover);
}

main {
    max-width: 600px;
    margin: auto;
    padding: 20px;
}
main p {
    margin: 8px 10px 2px;
}


aside {
    position: sticky;
    padding: 10px 15px;
    z-index: 3;
}
aside h3 {
    flex: 0 0 2.3em;
    display: inline-block;
    margin: 5px 0 0;
}
aside .flex {
    align-items: flex-start;
    margin-bottom: 2px;
}

details {
    margin-bottom: 15px;
}
details article {
    padding: 8px 5px 10px;
    border-radius: 0 0 5px 5px;
    background: var(--c-base);
}

summary {
    display: block;
    position: relative;
    top: 10px;
    padding: 5px 10px 5px 2.3em;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.95em;
    color: #fff;
    background: var(--c-link-sub);
    z-index: 6;
}
summary::-webkit-details-marker {
    display: none;
}
summary:before {
    display: block;
    content: "";
    width: 0.5em;
    height: 0.5em;
    position: absolute;
    top: 0.65em;
    left: 0.9em;
    border-bottom: 3px solid var(--c-link-on);
    border-left: 3px solid var(--c-link-on);
    border-radius: 2px;
    transform: rotate(-45deg);
    transition: .1s;
}
summary:hover {
    cursor: pointer;
    background: var(--c-hover);
}
details[open] summary:before {
    top: 0.95em;
    transform: rotate(-225deg);
    transition: .1s;
}


/* PC向け */

@media (min-width: 1100px) {
    
    #contents {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    #contents article {
        flex: 0 0 49%;
    }
    
}

/* PC・Pad向け */

@media (min-width: 800px) {

    header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        width: 100%;
        top: 0;
        left: 0;
        background-color: var(--c-base);
    }

    header nav {
        background: none;
    }
    header nav ul li {
        gap: 5px;
    }
    
    dl div:not(:last-child) {
        margin-bottom: 8px;
    }
    
    aside {
        width: 380px;
        top: 60px;
        font-size: 0.95em;
        background: none;
    }
    aside article {
        font-size: 0.95em;
    }

    #wrap {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        margin: auto;
        max-width: 95vw;
    }

    #memo {
        
        summary {
            pointer-events: none;
            padding-left: 1em;
            color: var(--c-font);
            background: var(--c-bgc);
        }
        summary::before {
            display: none;
        }
        
        article {
            overflow-y: scroll;
            height: 60vh;
            margin-top: 10px;
            padding-top: 0;
        }
        
    }
    
    .search {
        position: relative;
        margin: 20px 0 5px;
        padding: 15px;
        border-radius: 7px;
        border: 3px solid var(--c-bgc);
    }
    .search > .flex {
        display: block;
        margin-top: 5px;
    }
    .abs {
        position: absolute;
        top: -1.2em;
        padding: 0 10px 0 5px;
        background: var(--c-base);
    }
    .abs h3 {
        font-size: 1.05em;
        margin-bottom: 5px;
    }
    
    /*
    .abs {
        margin-bottom: 8px;
        padding: 0 5px;
        border-radius: 5px;
        background: var(--c-bgc);
    }
    */
    
    .tmb_pc {
        height: 160px;
    }
    #contents .tmb_pc {
        width: 90%;
        height: 160px;
    } 
    #contents .tmb_pc:hover {
        height: 256px;
        opacity: 1;
    }
    
    .tmb_sp {
        width: 80px;
        height: 160px;
    }
    .tmb_sp:hover {
        width: 120px;
        height: 240px;
    }
    .tmb_sp:hover + h3 {
        width: 70%;
        margin-bottom: 50px;
    }
    
    .tag_note dt {
        top: 1px;
    }

    .flex_pc {
        display: flex;
    }

}


/* スマホ向け */

@media (max-width: 799px) {

    body {
        font-size: 0.9em;
    }

    header {
       padding: 1px 0 0;
    }
    header hgroup {
        margin: 10px 15px;
    }
    header nav {
        text-align: center;
        background-color: var(--c-dk-gray);
    }
    header nav ul {
        display: flex;
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 10px;
        font-size: 1.05em;
    }
    header nav a {
        flex: 1;
        opacity: 1;
        padding: 10px 0;
        background-color var(--c-dk-gray);
    }

    aside {
        display: flex;
        flex-wrap: wrap;
        top: 0;
        padding-top: 0;
        border-top: 1px solid var(--c-border);
        border-bottom: 1px solid var(--c-border);
        /*background: rgba(230,230,230,0.9);*/
    }
    aside div {
        display: block;
        max-width: 100%;
        flex: 0 0 100%;
    }
    aside .search {
        order: 2;
        margin-top: 3px;
    }
    
    details article {
        overflow-y: scroll;
        height: 32vh;
    }
    
    dl div:not(:last-child) {
        margin-bottom: 5px;
    }

    .abs {
        display: none;
    }

    .search {
        max-width: 480px;
        margin: auto;
    }
    .search .flex {
        align-items: center;
    }
    .search .flex h3 {
        position: relative;
        top: -2px;
    }
    
    .tmb_pc {
        height: 192px;
    }
    #contents {
        
        .tmb_pc {
            width: 95%;
            height: 160px;
        } 
        .tmb_pc:hover {
            height: 258px;
            opacity: 1;
        }
        h3 {
            width: 80%;
        }
        
    }
    .tmb_sp {
        width: 80px;
        height: 160px;
        bottom: 1em;
    }
    .tmb_sp:hover {
        width: 96px;
        height: 192px;
    }
    .tmb_sp:hover + h3 {
        width: 70%;
    }
    
}