@charset "utf-8";

/*--------------------*/
/*フォント*/
/*--------------------*/

@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Aoboshi+One&display=swap');

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/*--------------------*/
/*色*/
/*--------------------*/

:root {
    --color__main: #E4E4E4;
    --color__sabu: #cdcdcd;
    --color__sabu2: #4e5156;
    --color__text: #2a2a31;
    --color__accent: #E5B072;
    --color__accent2: #32759d;
    --color__accent3: #7C6F3E;
}

/*--------------------*/
/*ベタ打ち*/
/*--------------------*/

* {
    /*簡易リセットCSS*/
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*その他CSS*/
    line-height: 1.75em;
}

html {
    font-size: 16px;
    font-family: "Noto Sans JP", serif;
    color: var(--color__text);
}

body {
    /*firefoxでなぜか下に空白ができてしまうことへの対応*/
    background-color: var(--color__text);
}

header, main, footer {
    padding: 30px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Aoboshi One", serif;
    line-height: 1em;
    margin: 0 0 0.5em;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.7rem;
}

h4 {
    font-size: 1.4rem;
}

h5 {
    font-size: 1.2rem;
}

h6 {
    font-size: 1rem;
}

small {
    font-size: 0.8rem;
}

a {
    color: var(--color__accent2);

    &:visited {
        color: var(--color__accent3);
    }

    &:hover {
        color: var(--color__text);
    }
}

img {
    /*画像下の空白が無くなる*/
    vertical-align: middle;
}

ul, ol {
    /*リストがボックス内に収まる*/
    list-style-position: inside;
    /*改行したとき、行頭が「・」の右側で揃う*/
    padding-left: 1em;
    text-indent: -1em;
}

audio {
    /*line-heightの代用*/
    margin: 1rem 0;
}

strong {
    /*てがろぐ本体で生成される注意書きのデザインを変更*/
    color: var(--color__main);
    line-height: 1.75rem;
    border: none;
    border-radius: 0.25rem;
    background-color: var(--color__accent3);
}


input[type=text] {
    font-family: 'Zen Maru Gothic', serif;
    border: solid 1px var(--color__sabu2);
    border-radius: 0.2rem;
    background-color: var(--color__main);
}

input[type=button], input[type=submit] {
    padding: 0.2rem 0.5rem;
    font-size: 0.6rem;
    color: var(--color__sabu);
    border: solid 1px var(--color__sabu);
    border-radius: 0.2rem;
    background-color: transparent;

    &:hover {
        background-color: var(--color__sabu2);
        color: var(--color__main);
        border: solid 1px var(--color__text);
        cursor: pointer;
    }
}

input[type="file"] {
    padding: 0.2rem 0.5rem;
    font-size: 0.6rem;
    color: var(--color__sabu2);
    border-radius: 0.2rem;
    background-color: transparent;

    &:hover {
        background-color: transparent;
        color: var(--color__text);
        border: solid 1px var(--color__text);
        cursor: pointer;
    }
}

select {
    font-family: 'Zen Maru Gothic', serif;
    background-color: var(--color__main);
}

/*--------------------*/
/* レイアウト*/
/*--------------------*/

body {
    width: auto;
}

@media screen and (max-width: calc(100vh)) {
    body {
        grid-template-areas: 
            "header"
            "main"
            "footer";
            grid-template-columns: auto;
    }
}

header {
    grid-area: header;
}

main {
    grid-area: main;
}

footer {
    grid-area: footer;
}

/*--------------------*/
/*ヘッダー*/
/*--------------------*/

header {
    background-color: var(--color__sabu);

    & h1 {      
        width: 80%;
        max-width: 640px;
        margin: 0 auto;
        padding: 0.5rem 0;
        text-align: center;
        background-color: var(--color__accent2);
        border-radius: 0.2rem;

        & a {
            color: var(--color__main);
            text-decoration: none;
            line-height: normal;
        }

        & a:visited {
            color: var(--color__main);
        }
    
        & a:hover {
            color: var(--color__main);
        }
    }

    .sabutitle {
        color: var(--color__accent2);
        font-family: "Aoboshi One", serif;
    }

    > * {
        margin-bottom: 1rem;
    }

}

/*--------------------*/
/*メイン*/
/*--------------------*/

main {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: var(--color__main);

    & > * {
        width: 80%;
        max-width: 640px;
    }

}

/*簡易投稿エリア*/

.postarea form {
    position: relative;
    padding: 1rem;
    background-color: var(--color__sabu);
    border: solid 1px var(--color__sabu);
    border-radius: 0.5rem;
    margin-bottom: 2rem;

    input[type="button"], input[type="submit"]{  
        color: var(--color__sabu2);
        border: solid 1px var(--color__sabu2);
    }
}

.tegalogpost {
    width: 100%;
    min-height: 8rem!important;
    padding: 0.5rem;
    font-family: 'Zen Maru Gothic', serif;
    font-size: 1rem;
    color: var(--color__text);
    border: solid 1px var(--color__accent2);
    border-radius: 0.25rem;
    background-color: var(--color__main);
}

.line-control {
    margin-top: 0.5rem;
    color: var(--color__sabu2);
}

.line-control span {
    margin-right: 0.2rem;
}

input[type=submit].postbutton {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: var(--color__main) !important;
    border: solid 1px var(--color__text);
    border-radius: 1.2rem;
    background-color: var(--color__accent2);

    &:hover {
        background-color: transparent;
        color: var(--color__accent3);
        border: solid 1px var(--color__accent3);
        cursor: pointer;
    }
}

.hashtagEasyInput {
    margin-right: 0.2rem;
}

.changelink {
    display: none;
}

.decoBtns input[type=button] {
    margin-right: 0.2rem;
}

.catChecks label {
    margin-right: 5px;
    font-size: 90%;
}

/*データセパレータ*/

.dateseparator {
    display: none;
}

/*記事*/

article.post {
    /*記事をarticleで囲んでいる*/
    margin-bottom: 4rem;

    .header {
        margin: 1rem 0;
        display: flex;
        gap: 1rem;
        justify-content: center;
        align-items: center;

        .postdate {
            width: 12em;
            padding: 0.35rem .5rem;
            font-size: 0.9rem;
            line-height: 0.8rem;
            text-align: center;
            color: var(--color__main);
            background-color: var(--color__accent2);
        }

    }

    .header::after {
        content: " ";
        width: calc(100% - 12em - 2em);
        height: 1px;
        font-size: 0.8rem;
        border-top: 1px solid var(--color__accent2);
    }

    .main {

        & p {
            margin: 1rem 0 .5rem;
        }

    }

    .categories {
        display: flex;
        align-items: center;

        .categorylink {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 0.5rem;
            text-decoration: none;
        }

        .categorylink:first-child {
            margin-left: 0;
        }

        .categorylink::before {
            font-family: 'Material Symbols Outlined';
            content: "\e2c8";
            color: var(--color__sabu2);
        }

        .categorylink span {
            display: block;
            padding: 0.05rem 0.05rem;
            font-size: 0.8rem;
            color: var(--color__sabu2);
        }

        .categorylink span:hover {
            color: var(--color__text);
        }
    
        .categorylink:hover > * {
            text-decoration: 1px underline var(--color__text);
        }
    }
    
    .catseparator {
        display: none;
    }

    .footer {
        display: flex;
        justify-content: flex-end;
    }

}

/*固定投稿*/

.fixed {
    display: none;
}

.logstatus-fixed {

    .fixed {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: 0.5rem;
        font-size: 0.8rem;
        color: var(--color__sabu2);
    }

    & .material-symbols-outlined {
        font-size: 1rem;
        color: var(--color__sabu2);
    }

}

/*鍵付き投稿*/

.passkeybox {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    .passkeyguide, .passkeyinput, .submitcover {
        display: block;
        line-height: 0;
    }

    .passkeyinput {
        font-size: 1rem;
    }

}

.locked {
    display: none;
}

.logstatus-lock {

    .locked {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: 0.5rem;
        font-size: 0.8rem;
        color: var(--color__sabu2);
    }

    & .material-symbols-outlined {
        font-size: 1rem;
        color: var(--color__sabu2);
    }
}

/*タグ*/

.taglink {
    text-decoration: none;
    font-size: 13px;

    &:hover {
        text-decoration: underline;
    }
}

/*ページリスト*/

.pagenavi {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1rem;
}

a.pagenumlink {
    width: 1.6rem;
    height: 1.6rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color__sabu2);
    text-decoration: none;
    border: solid 1px var(--color__sabu2);
    border-radius: 0.2rem;

    &:hover {
        color: var(--color__main);
        background-color: var(--color__text);
    }
}

a.pagenumhere {
    color: var(--color__main);
    background-color: var(--color__accent2);

    &:hover {
        color: var(--color__main);
        background-color: var(--color__text);
    }
}

/*検索*/

.search {

    & span.searchinputs {
        display: grid;
        grid-template-columns: calc(80% - 1rem) 20%;
        gap: 1rem;
    }

    & input.queryinput {
        padding: 0.2rem 0.5rem;
    }

    & span.submitcover {
        position: relative;
    }

    & input.submitbutton {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/*複合検索*/

.complexsearch {
    
    & details.searchbox {
        margin-top: 1rem;
    }

    & p.searchbox {
        display: grid;
        grid-template-columns: calc(80% - 1rem) 20%;
        gap: 1rem;
        margin: 1rem 0;
    }

    & input.queryinput {
        padding: 0.2rem 0.5rem;
    }

    & input.submitbutton {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    & ul {
        list-style: none;
        font-size: 0.8rem;

        & li {
            display: flex;
            flex-wrap: wrap;
            margin: 0.5rem 0;
        }

        .solabel {
            display: block;
            width: 5rem;
        }
    
        & select {
            display: block;
        }
    }

}

/*個別投稿ページ*/

.utilitylinks {
    padding: 1rem;
    background-color: var(--color__sabu);
    border-radius: 0.5rem;

    & ul {
        list-style: none;
    }
}

/*--------------------*/
/*ナビゲーション*/
/*--------------------*/

/*てがろぐの各種機能をナビゲーションとしてまとめている*/

nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    justify-content: space-between;

    & > div {
        width: 100%;
    }

    & h2 {
        font-size: 1.25rem;
    }

    & ul {
        list-style: none;

        .num {
            color: var(--color__accent2);
        }
    }
}

/*カレンダー*/

div.calendar {
    & table.calendar {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    & table.calendar > * {
        width: 100%;
        max-width: 400px;
    }

    & caption {

        display: flex;
        justify-content: center;
        align-items: center;

        & span {
            display: block;
        }

    }

    & tbody, thead {
        & tr {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            width: 100%;
        }

        & th {
            display: block;
        }
    }
}

/*新着画像*/

.imagelist {

    .list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .imagelistitem {
        display: block;
        width: calc((100% - 1rem)/3);
        height: auto;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        border-radius: 0.25rem;

        & a {
            display: block;
            width: 100%;
            height: 100%;
        }

        & img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        & :hover {
            filter: brightness(1.2) contrast(0.8);
        }
    }
}

/*カテゴリー*/

.categoryarea {
    & ul.cattree {
        
        & li.catbranch a::before {
            font-family: 'Material Symbols Outlined';
            content: "\e2c8";
            color: var(--color__accent2);
        }

        & li.catbranch a:visited::before {
            color: var(--color__accent3);
        }

        & li.catbranch a:hover::before {
            color: var(--color__main);
        }
    }
}

/*ハッシュタグ*/
.hashtag {

    & ul.hashtaglist {
        /*デフォルトのリストで特有の設定をしている関係上、ここでリセットする必要がある*/
        padding-left: 0;
        text-indent: 0;

    }

    .taglink {

        &::before {
            /*ハッシュタグ表示*/
            content: "#";
        }

    }
}

/*最近の投稿*/

.latestpostlist {

    /*デフォルトのリストで特有の設定をしている関係上、ここでリセットする必要がある*/
    padding-left: 0;
    text-indent: 0;

    & span {
        display: none;
    }
}

/*--------------------*/
/*フッター*/
/*--------------------*/

footer {
    max-width: 980px;
    margin: 0 auto;
    color: var(--color__main);
    background-color: var(--color__text);

    > * {
        margin-bottom: 2rem;
    }

    > *:last-child {
        margin-bottom: 0;
    }

    & a {
        text-decoration: none;
    }

    & a:hover {
        color: var(--color__main);
        text-decoration: underline;
    }

    .toplink {
        & h1 {
            font-size: 2rem;
            line-height: 0;
            margin: 0;
        }

        & h1 a {
            color: var(--color__main);
            line-height: normal;
            text-decoration: none;
        }

        & h1 a:visited {
            color: var(--color__main);
        }
    
        & h1 a:hover {
            color: var(--color__main);
            text-decoration: 1px underline var(--color__main);
        }

        .sabutitle {
            font-family: "Aoboshi One", serif;
        }

    }

    .system {
        
        display: flex;

        & span {
            display: block;
        }

        .material-symbols-outlined {
            font-size: 1rem;

        }

        & a {
            text-decoration: none;
        }

    }

}

/*--------------------*/
/*ページトップ遷移ボタン*/
/*--------------------*/

a.pagetop {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid var(--color__sabu2);
    background-color: var(--color__main);

    & span {
        display: block;
    }
}

/*--------------------*/
/*汎用装飾*/
/*--------------------*/

/* B:太字(Bold) */
.decorationB {
    font-weight: bold;
}

/* D:削除(Delete) */
.decorationD {
    color: var(--color__sabu2);
    text-decoration: line-through var(--color__sabu2);
}

/* E:強調(Emphasis) */
.decorationE {
    background: linear-gradient(transparent 60%, #FFED58 40%);
    font-style: normal;
    font-weight: bold;
}

/* I:斜体(Italic) */
.decorationI {
    font-style: italic;
}

/* Q:引用(Quote) */
.decorationQ {
    margin: 1rem 0;
    padding: 1rem;
    border-left: solid 2px var(--color__sabu2);
}

.decorationQ::before,
.decorationQ::after {
    /*引用符の非表示に*/
    content: '';
}

.decorationQ + br {
    display: none;
}

/* S:小文字(Small) */
.decorationS {
    font-size: 0.8em;
}

/* T:極小文字(Tiny) */
.decorationT {
    font-size: 0.6em;
}

/* U:下線(Underline) */
.decorationU {
    text-decoration: underline var(--color__text);
}

/*続きを読む*/
.readmorebutton {
    display: grid;
    grid-template-columns: minmax(2rem, 1fr) auto minmax(2rem, 1fr);
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-decoration: none;
}

.readmorebutton::before, .readmorebutton::after {
    content: " ";
    display: block;
    width: 100%;
    height: 1px;
    border-top: 1px dashed var(--color__accent2);
}

/*続きを読む（閉じるボタン）*/
/*
.readmoreclose {

}
*/

/*リスト*/

.decorationL {
    & + br {
        display: none;
    }
}

dl.decorationL {
    & dd {
        padding-left: 2rem;
    }
}

/*--------------------*/
/* 埋め込み画像 */
/*--------------------*/

figure.nsfw {
    overflow: hidden; /* ぼかし領域がfigureのボックスからはみ出ないようにする */
}

.imagelink.nsfw {
    overflow: hidden; /* ぼかし領域がfigureのボックスからはみ出ないようにする */
}

img.nsfw {
    filter: blur(9px); /* ぼかす */

}

.imagelink {
    display: block;
    max-width: calc(50% - 1rem);
    height: auto;
    margin: 0.5rem 0;
    border-radius: 0.25rem;
    overflow: hidden;

    & img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    & :hover {
        filter: brightness(0.5) contrast(0.8);
    }

    & +br {
        display: none;
    }
}

img.nsfw:hover {
    filter: blur(9px) brightness(0.5) contrast(0.8);
}


.imagelist {
    
    .imagelistitem {
        & img.nsfw:hover {
            filter: blur(9px) brightness(0.5) contrast(0.8);
        }

    }
}

.embeddedpictbox {
    margin: 0.5rem 0;
    max-width: calc(50% - 1rem);
    height: auto;

    .imagelink  {
        max-width: 100%;
        margin: 0;
    }
    
    & figcaption{
        font-size: 0.8rem;
        color: var(--color__sabu2);
    }

    & +br {
        display: none;
    }
}

/*--------------------*/
/*レスポンシブ*/
/*--------------------*/

@media screen and (max-width: calc(100vh)) {

    header {
        display: flex;
        flex-direction: column;
        align-items: center;

        & > * {
            width: 80%;
        }
    
    }

    .imagelink {
        max-width: 100%;
    }

    .embeddedpictbox {
        max-width: 100%;
    }

}

@media screen and (max-width: 800px) {

    header {
        & > * {
            width: 100%;
        }

        & h1{
            width: 100%;
        }
    
    }

    main {
        & > * {
            width: 100%;
        }
    
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;

        & > div {
            width: 100%;
        }

    }
    
    .imagelink {
        max-width: 100%;
    }

    .embeddedpictbox {
        max-width: 100%;
    }

    .passkeybox {
        flex-wrap: wrap;
        row-gap: 1rem;
        padding-top: 1rem;
    }

}

/*--------------------*/
/*自由装飾（画像複数カラム化）*/
/*--------------------*/

/*画像の二カラム化*/

.deco-2column {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 0.5rem;
    margin-top: 0.5rem;

    & .imagelink {
        max-width: calc((100% - 0.5rem)/2);
        margin: 0;
        height: fit-content;
    }

    & .embeddedpictbox {
        max-width: calc((100% - 0.5rem)/2);
        margin: 0;
        height: fit-content;
        
        & .imagelink {
            max-width: 100%;
        }
    }
}

/*画像の三カラム化*/

.deco-3column {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 0.5rem;
    margin-top: 0.5rem;

    & .imagelink {
        max-width: calc((100% - 1rem)/3);
        margin: 0;
        height: fit-content;
    }

    & .embeddedpictbox {
        max-width: calc((100% - 1rem)/3);
        margin: 0;
        height: fit-content;

        & .imagelink {
            max-width: 100%;
        }
    }
    
}

/*二カラムmasonry版（敷き詰めるようなデザイン）*/
/*異なる画像幅の画像を並べるときはこちらを推奨*/

.deco-2column_m {
    display: block;
    column-count: 2;
    margin-top: 0.5rem;

    & .imagelink {
        max-width: 100%;
        break-inside: avoid;
        margin: 0 0 0.5rem;
    }

    & .embeddedpictbox {
        max-width: 100%;
        break-inside: avoid;
        margin: 0 0 0.5rem;

        .imagelink  {
            margin: 0;
        }
    }
}

/*三カラムmasonry版*/

.deco-3column_m {
    display: block;
    column-count: 3;
    margin-top: 0.5rem;

    & .imagelink {
        max-width: 100%;
        break-inside: avoid;
        margin: 0 0 0.5rem;
    }

    & .embeddedpictbox {
        max-width: 100%;
        break-inside: avoid;
        margin: 0 0 0.5rem;

        .imagelink  {
            margin: 0;
        }
    }
}

/*--------------------*/
/*その他*/
/*--------------------*/

.url {
    /*ＵＲＬがボックスから食み出ないように設定。*/
    /*ＵＲＬがボックスから食み出ると、レスポンシブデザインが崩れることがある。*/
    word-break: break-all;
}

.embeddedmovie{
    /*動画がボックスから食み出ないように設定。*/
    /*動画がボックスから食み出ると、レスポンシブデザインが崩れることがある。*/
    display: block;
    max-width:100%;
}

.embeddedmovie iframe{
    /*埋め込みコンテンツ（動画）がボックスから食み出ないように設定。*/
    /*埋め込みコンテンツ（動画）がボックスから食み出ると、レスポンシブデザインが崩れることがある。*/
    display: block;
    max-width:100%;
}

iframe.instagram-media {
    /*埋め込みコンテンツ（インスタ）がボックスから食み出ないように設定*/
    /*埋め込みコンテンツ（インスタ）がボックスから食み出ると、レスポンシブデザインが崩れることがある。*/
    max-width: 100% !important;
    min-width: initial !important;
}

.embeddedmusic iframe {
    /*埋め込みコンテンツ（音声）がボックスから食み出ないように設定。*/
    /*埋め込みコンテンツ（音声）がボックスから食み出ると、レスポンシブデザインが崩れることがある。*/
    max-width: 100% !important;
    min-width: initial !important;
}