:root {
    --paper: #fbf8f3;
    --card: #ffffff;
    --ink: #6f655b;
    --ink-soft: #8c8074;
    --line: #e6dfd5;
    --accent: #6f8fb4;
    --accent-soft: #e9eff6;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "Yu Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
    line-height: 1.9;
    letter-spacing: 0.04em;
}

a {
    color: var(--accent);
}

main {
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 16px 64px;
}

/* ---- 表紙：縦書きの題と見本の画面 ---- */
.cover {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.cover-text {
    writing-mode: vertical-rl;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 520px;
}

.cover-text h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #5e554c;
}

.cover-text .shell {
    font-size: 15px;
    color: var(--ink-soft);
    letter-spacing: 0.15em;
}

.cover-text .catch {
    margin-top: 28px;
    font-size: 18px;
    letter-spacing: 0.2em;
}

.nb {
    display: inline-block;
}

.cover figure {
    margin: 0;
}

.shot {
    display: block;
    width: 100%;
    max-width: 458px;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(94, 85, 76, 0.18);
    background: var(--card);
}

.cover figcaption,
.gallery figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-soft);
    text-align: center;
}

/* ---- ダウンロード ---- */
.download {
    margin: 56px auto 0;
    max-width: 560px;
    text-align: center;
}

.download .button {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    text-decoration: none;
    letter-spacing: 0.12em;
    box-shadow: 0 4px 14px rgba(111, 143, 180, 0.35);
}

.download .button:hover {
    filter: brightness(1.06);
}

.download .note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-soft);
}

/* ---- 本文 ---- */
section {
    margin-top: 64px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #5e554c;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.15em;
}

p {
    margin: 0 0 14px;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.features li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}

.features b {
    display: block;
    color: #5e554c;
    margin-bottom: 4px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.gallery figure {
    margin: 0;
}

dl {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
}

dt {
    color: var(--ink-soft);
}

dd {
    margin: 0;
}

code {
    font-size: 12px;
    word-break: break-all;
    background: var(--accent-soft);
    padding: 1px 6px;
    border-radius: 4px;
}

footer {
    margin-top: 72px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-soft);
}

@media (max-width: 720px) {
    main {
        padding-top: 32px;
    }

    .cover {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .cover-text {
        height: auto;
        writing-mode: horizontal-tb;
        text-align: center;
        gap: 6px;
    }

    .cover-text h1 {
        font-size: 28px;
        letter-spacing: 0.15em;
    }

    .cover-text .catch {
        margin-top: 8px;
        font-size: 16px;
    }

    .download .button {
        padding: 14px 22px;
        font-size: 15px;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    .features {
        grid-template-columns: 1fr;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    dd {
        margin-bottom: 10px;
    }
}

/* ---- 表のページの結び：作者さまのお名前と、もう少し詳しくへの道 ---- */
.colophon {
    margin-top: 56px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-soft);
}

.colophon p {
    margin: 0 0 6px;
}

/* ---- もう少し詳しく（more.html）の見出し ---- */
.subhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.subhead a {
    font-size: 20px;
    font-weight: 600;
    color: #5e554c;
    text-decoration: none;
    letter-spacing: 0.2em;
}

.subhead span {
    font-size: 13px;
    color: var(--ink-soft);
}

.subhead + section {
    margin-top: 40px;
}
