/* 画面上の表示範囲 */

html {
    height: 100vh;
    padding: 0;
    margin: 0;
    font-size: 16px;
}

/* 色の指定 */

:root {
    --background: #f3f3f3;
    --font: #333132;
    --cerulean: #008db7;
    --saxe: #418b89;
    --grass: #fff;
}

.image-background {
    display: inline-block;
    margin: 0.3rem 0 0.3rem 0;
    border-radius: 0.7em;
    box-shadow: 13px 13px 30px #f0f0f0,
        -13px -13px 30px #fff;
}

@media (prefers-color-scheme: dark) {
    html {
        transition: .5s;
    }

    :root {
        --background: #252525;
        --font: #f7f7f7;
        --cerulean: #1cadd9;
        --saxe: #4ab0ad;
        --grass: #363636;
    }

    .image-background {
        margin: 0;
        box-shadow: none;
    }
}

/* Webフォントの設定 */

.zen-maru gothic-light {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 300;
    font-style: normal;
}

.zen-maru gothic-regular {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 400;
    font-style: normal;
}

.zen-maru gothic-medium {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 500;
    font-style: normal;
}

.zen-maru gothic-bold {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 700;
    font-style: normal;
}

.zen-maru gothic-black {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 900;
    font-style: normal;
}

/* 基本スタイル */

body {
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
    font-family: "游ゴシック体", "YuGothic", "游ゴシック Medium", "Yu Gothic Medium", sans-serif;
    color: var(--font);
    background-color: var(--background);
}

#container {
    padding: 3rem;
}

h1 {
    font-family: "Zen Maru Gothic";
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    padding-bottom: 2px;
}

h2 {
    font-family: "Zen Maru Gothic";
    margin: 2rem auto 0.5rem 0;
    font-size: 2rem;
    font-weight: bold;
    color: var(--cerulean);
}

h4 {
    font-size: 1.1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 1rem 0;
}

a {
    font-family: "Zen Maru Gothic";
    font-size: 1rem;
    color: var(--saxe);
    text-decoration: underline;
}

main a {
    font-weight: 500;
}

h3,
h3 a {
    font-family: "Zen Maru Gothic";
    margin: 2rem 0 2rem 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cerulean);
}

ul {
    padding-left: 0;
}

li {
    font-size: 1rem;
    line-height: 1.6;
}

button {
    border: none;
    color: var(--font);
    background-color: var(--grass);
    border-radius: 50px;
    cursor: pointer;
}

strong,
.strong {
    font-family: "Zen Maru Gothic";
    font-weight: bold;
    color: var(--cerulean);
}

em {
    font-style: normal;
}

/* セクション範囲 */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
    padding: 2rem 0;
    box-sizing: border-box;
    z-index: 1000;
}

main {
    max-width: 760px;
    height: auto;
    margin: 5rem auto 0 auto;
}

footer {
    display: inline-block;
    width: 100%;
    height: auto;
    padding: 0.5rem 0;
}

/* 個別のスタイル */

/* header */

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: var(--grass);
    width: 3rem;
    height: 3rem;
    border-radius: 50px;
    padding: 0;
}

#home-btn {
    margin-left: 2rem;
}

#pagetitle button {
    text-align: center;
    background-color: var(--grass);
    border-radius: 50px;
    margin: 0 1.25rem;
    width: 20rem;
    height: 3rem;
}

#nav-btn {
    margin-right: 2rem;
}

header button svg {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-rect {
    fill: var(--grass);
}

.icon-path {
    stroke: var(--font);
}

.icon-dot {
    fill: var(--font);
}

nav {
    display: none;
}

nav ul {
    position: absolute;
    top: 75%;
    right: 3%;
    background-color: var(--grass);
    padding: 1rem 1.25rem;
    border-radius: 7px;
    z-index: 10000;
    cursor: default;
}

nav li {
    list-style: none;
}

nav ul li a {
    font-family: "游ゴシック体", "YuGothic", "游ゴシック Medium", "Yu Gothic Medium", sans-serif;
    text-decoration: none;
    color: var(--font);
    cursor: pointer;
}

nav ul li span,
nav ul li a:hover {
    color: var(--saxe);
}

/* 記事固有 */

.tag,
.link-header,
.index-header {
    color: var(--saxe);
}

details ul li a,
.tag a,
.link-card,
.index {
    text-decoration: none;
}

main a {
    word-break: break-all;
}

.space {
    margin: 2.5rem 0 2.5rem 0;
}

.tag {
    margin: 0.5rem 0 0.8rem 0;
    font-size: 1rem;
}

.tag span {
    padding-left: 5px;
}

article p,
article ul li {
    line-height: 1.8em;
    letter-spacing: 0.04em;
}

article ul li::marker {
    color: var(--cerulean);
}

article ol li {
    line-height: 1.7em;
}

article li {
    padding-bottom: 0.4em;
}

.caption {
    text-align: center;
}

.caption p {
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 13px;
}

.caption a {
    font-size: 1rem;
}

.images-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0;
}

.images-wrapper {
    height: 0;
    padding-bottom: 100%;
    position: relative;
}

.images-wrapper:first-child {
    margin-right: 5px;
}

.images-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.image-container {
    display: -webkit-flex;
    display: flex;
    width: 100%;
    max-height: 40vh;
    margin: 1rem 0;
}

.image-wrapper {
    display: inline-block;
    text-align: center;
    height: auto;
    width: 100vw;
}

.image-wrapper img {
    object-fit: cover;
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
    border-radius: 5px;
}

@media (orientation: landscape) {
    .image-container {
        width: 100%;
        max-height: 50vh;
    }

    .image-wrapper {
        height: auto;
        width: 100vw;
    }
}

#banner {
    height: 40px;
    width: 200px;
}

#banner img {
    display: inline;
}

#youtube {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.link-card,
.index {
    display: block;
    position: relative;
    padding: 20px;
    color: var(--font);
    font-size: 0.9rem;
    border: 1px solid var(--cerulean);
    border-radius: 5px;
}

.link-card {
    margin: 2rem 0;
}

.index {
    margin: 2rem 0;
}

.link-card::after {
    display: block;
    word-break: break-all;
    margin: 10px 0 0 0;
    content: attr(href);
    font-size: 12px;
    color: var(--font);
    font-weight: normal;
}

.link-header,
.index-header {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0 0.5em;
    margin: 0;
    background-color: var(--background);
    transform: translateY(-50%) translateX(1em);
}

.index a {
    color: var(--font);
}

.index {
    padding: 0.5em 2em;
}

.index .tag {
    margin: 0;
}

.caution-container {
    height: 100vh;
    margin-bottom: 6px;
}

@media screen and (max-width: 819px) {
    body {
        margin: 0 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    main {
        margin: 2em 0 0.3em 0;
    }

    .link-card,
    .index {
        padding: 15px;
        font-size: 15px;
    }

    .link-card::after {
        margin-top: 7px;
    }
}

@media screen and (max-width: 339px) {
    nav details summary {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

article details,
ol,
article ul {
    padding-inline-start: 20px;
}

.footnote,
article details,
#unti {
    border-radius: 15px;
    margin: 2em 0;
    padding: 15px 20px;
}

.footnote,
article details {
    background-color: var(--grass);
}

#unti {
    background-color: var(--background);
}

pre {
    margin: 1em 0;
    padding: 1em;
    border-radius: 5px;
    background: #25292f;
    color: #fff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* footer */

footer p {
    display: inline-block;
}

#copyright {
    float: right;
}

#copyright p {
    font-size: 0.9rem;
}

.bullet {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--cerulean);
    border-radius: 50%;
    margin-right: 10px;
}

/* レスポンシブ対応 */
/* モバイルデバイス用 */

@media (max-width: 476px) {

    html {
        font-size: 12px;
    }

    body,
    header {
        max-width: 476px;
    }

    main {
        margin: 6rem auto 0 auto;
    }

    #container {
        padding: 2rem;
    }

    #pagetitle button {
        width: 15rem;
    }

    main p,
    main a,
    main li,
    nav ul li a {
        font-size: 14px;
    }
}

@media (min-width: 476px) and (max-width: 767px) {
    html {
        font-size: 14px;
    }

    body,
    header {
        max-width: 767px;
    }
}


/* タブレット用 */
@media (min-width: 768px) and (max-width: 1023px) {
    html {
        font-size: 15px;
    }

    body,
    header {
        max-width: 1023px;
    }

    .caption p,
    #copyright p {
        font-size: 12px;
    }
}