:root {
    --bg: #f5f5f3;
    --card: #fff;
    --text: #171717;
    --muted: #6b6b6b;
    --line: #ddd;
    --accent: #111;
    --danger: #a61b1b;
    --max: 1180px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    line-height: 1.75
}

.wrap {
    width: min(calc(100% - 32px), var(--max));
    margin: auto
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10
}

.header-inner {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0
}

.brand {
    font-weight: 900;
    font-size: 1.6rem;
    color: #111;
    text-decoration: none
}

.header-search {
    display: flex;
    max-width: 420px;
    width: 100%
}

input,
textarea,
button {
    font: inherit
}

.header-search input,
.big-search input {
    flex: 1
}

.header-search input,
.header-search button,
.big-search input,
.big-search button {
    padding: 10px 12px;
    border: 1px solid #bbb;
    background: #fff
}

.header-search button,
.big-search button {
    background: #111;
    color: #fff;
    border-color: #111;
    cursor: pointer
}

main {
    padding: 24px 0
}

.hero {
    padding: 24px 0;
    text-align: center
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.15;
    margin: .1em 0
}

.eyebrow,
.category {
    font-size: .76rem;
    letter-spacing: .16em;
    font-weight: 800;
    color: var(--muted)
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    margin: 16px 28px
}

.maker {
    max-width: 760px;
    margin: 0 auto 42px
}

.maker form,
.manage form {
    display: grid;
    gap: 15px
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700
}

input[type=text],
input[type=password],
input[type=search],
textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: #fff
}

.check {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px
}

.check input {
    width: 20px;
    height: 20px
}

.note,
.meta,
.empty,
time {
    color: var(--muted);
    font-size: .9rem
}

.primary,
.danger,
.comments button {
    border: 0;
    border-radius: 8px;
    padding: 13px 18px;
    font-weight: 800;
    cursor: pointer
}

.primary,
.comments button {
    background: #111;
    color: #fff
}

.primary:disabled {
    opacity: .35;
    cursor: not-allowed
}

.danger {
    background: var(--danger);
    color: #fff
}

.three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 20px 0 42px
}

.three-cols>section>h2 {
    font-size: 1.15rem;
    border-bottom: 3px solid #111;
    padding-bottom: 8px
}

.news-list {
    display: grid;
    gap: 10px
}

.news-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px
}

.news-card a {
    display: block;
    padding: 15px;
    color: inherit;
    text-decoration: none
}

.news-card h3 {
    font-size: 1rem;
    line-height: 1.45;
    margin: 0 0 7px
}

.news-card p {
    font-size: .88rem;
    color: #555;
    margin: 0 0 10px
}

.meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.fiction-badge {
    background: #fff0b8;
    border: 1px solid #e3c35c;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 16px;
    font-weight: 800;
    text-align: center
}

.article {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto
}

.article h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.3;
    margin: 0 0 .2em
}

.lead {
    font-size: 1.15rem;
    font-weight: 700;
    border-left: 4px solid #111;
    padding-left: 16px;
    margin: 28px 0
}

.article-body p {
    font-size: 1.04rem;
    margin: 1.5em 0
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 30px
}

.tags a {
    background: #eee;
    color: #333;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 999px
}

.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px
}

.x-share,
.subtle {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 7px
}

.x-share {
    background: #000;
    color: #fff
}

.subtle {
    border: 1px solid #bbb;
    color: #333
}

.comments {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto
}

.comments textarea {
    min-height: 110px
}

.comment-list {
    margin-top: 22px
}

.comment {
    border-top: 1px solid #ddd;
    padding: 14px 0
}

.comment p {
    margin: 0 0 5px
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 15px 0
}

.error {
    background: #ffe8e8;
    color: #851919;
    border: 1px solid #e8b7b7
}

.manage {
    max-width: 760px;
    margin: auto
}

.manage hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 34px 0
}

.big-search {
    display: flex;
    gap: 8px
}

.about {
    margin-top: 30px
}

footer {
    border-top: 1px solid #ddd;
    background: #fff;
    color: #666;
    padding: 25px 0;
    font-size: .9rem
}

@media(max-width:900px) {
    .three-cols {
        grid-template-columns: 1fr
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column
    }

    .header-search {
        max-width: none
    }

    .hero {
        padding-top: 25px
    }
}

@media(max-width:560px) {
    .wrap {
        width: min(calc(100% - 20px), var(--max))
    }

    .panel {
        padding: 18px
    }

    .article-actions {
        flex-direction: column
    }

    .article-actions a {
        text-align: center
    }
}