:root {
    --bg: #060b10;
    --bg-soft: #0f1720;
    --surface: #121d28;
    --surface-2: #172736;
    --text: #edf3f7;
    --text-soft: #9aa9b3;
    --border: rgba(255, 255, 255, .08);
    --accent: #8bc9b8;
    --accent-strong: #6fb49f;
    --accent-2: #7ea6d8;
    --shadow: rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Yu Gothic", "Hiragino Sans", "Noto Sans JP", "Apple Color Emoji", sans-serif;
    background: linear-gradient(180deg,
            #080d13 0%,
            #0b131c 100%);
    color: var(--text);
    line-height: 1.75;
    letter-spacing: 0.01em;
}

body a {
    color: var(--accent-2);
    text-decoration: none;
}

body a:hover {
    text-decoration: underline;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 12px 64px;
}

.site-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(18, 29, 40, 0.98) 0%, rgba(24, 38, 51, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px 34px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    margin-bottom: 18px;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);

    background-size: 32px 32px;

    mask-image:
        linear-gradient(to bottom,
            rgba(0, 0, 0, .8),
            transparent);
}

.site-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    text-transform: uppercase;
    color: var(--text);
    font-family: "Inter", "Segoe UI", "Yu Gothic UI", "Yu Gothic", sans-serif;
    position: relative;
    font-size: 2rem;
    letter-spacing: .12em;
    font-weight: 600;
}

.site-header::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;

    width: 240px;
    height: 240px;

    border-radius: 50%;

    background: radial-gradient(circle,
            rgba(139, 201, 184, .15),
            transparent 70%);

    filter: blur(40px);

    pointer-events: none;
}

.site-description {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.98rem;
}

.quick-post-bar {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(18, 29, 40, 0.7);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.quick-post-bar form {
    display: grid;
    gap: 10px;
    width: 100%;
}

.quick-post-bar textarea,
.quick-post-bar input[type="text"],
.quick-post-bar input[type="submit"] {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 11, 16, 0.8);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    width: 100%;
}

.quick-post-bar textarea {
    min-height: 128px;
    border-radius: 8px;
    resize: vertical;
    max-width: 100%;
}

.quick-post-bar input[type="submit"] {
    cursor: pointer;
    background:
        rgba(139, 201, 184, .08) color: var(--accent);
    font-weight: 600;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(220px, 280px);
    gap: 24px;
    align-items: start;
}

.sidebar,
.main {
    background: rgba(19, 37, 51, 0.95);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.sidebar {
    display: grid;
    gap: 16px;
    align-content: start;
}

.sidebar h2,
.main h2 {
    border: none;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    font-family: "Inter", "Segoe UI", "Yu Gothic UI", "Yu Gothic", sans-serif;
    font-weight: 600;
    letter-spacing: .08em;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--accent);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li+li {
    margin-top: 8px;
}

.sidebar a {
    color: var(--text);
}

.sidebar a:hover {
    color: var(--accent);
}

.sidebar form,
.sidebar .searchbox,
.sidebar .complexsearch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sidebar input[type="text"],
.sidebar input[type="submit"],
.sidebar select {
    width: auto;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 11, 16, 0.8);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

.sidebar input[type="text"],
.sidebar select {
    flex: 1 1 140px;
}

.sidebar input[type="submit"] {
    flex: 0 0 auto;
    cursor: pointer;
    background:
        rgba(139, 201, 184, .08) color: var(--accent);
    font-weight: 600;
}

.toolbar-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.toolbar-inline form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.toolbar-inline .searchinputs,
.toolbar-inline .submitcover {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sidebar .searchoption,
.sidebar .searchtarget,
.sidebar .datelimitboxoptions,
.sidebar .datelimitbox {
    font-size: 0.92rem;
    color: var(--text-soft);
}

.datelimitboxoptions {
    display: none !important;
}

.post-list {
    display: grid;
    gap: 16px;
}

.post-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    background: linear-gradient(145deg, rgba(18, 29, 40, 0.98) 0%, rgba(23, 39, 54, 0.96) 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    margin-bottom: 6px;
    width: auto;
}

.post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition:
        180ms ease;
}

.post-card:hover::before {
    opacity: 1;
}


.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-date-link {
    color: var(--text-soft);
}

.post-date-link:hover {
    color: var(--accent);
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-actions a {
    color: var(--accent);
    font-weight: 600;
}

.post-title {
    margin: 0 0 12px;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--text);
}

.post-body {
    color: var(--text);
    line-height: 1.95;
    font-size: 1.01rem;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.post-body p {
    margin: 0 0 0.9rem;
}

.post-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: 8px;
    border: 1px solid rgba(139, 201, 184, 0.24);
    cursor: zoom-in;
}

.post-body a {
    overflow-wrap: anywhere;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-category,
.post-tag {
    display: inline-block;
    margin-right: 8px;
    margin-top: 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(139, 201, 184, 0.18), rgba(126, 166, 216, 0.16));
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid rgba(139, 201, 184, 0.24);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    padding: 4px 10px;
    font-size: .8rem;
}

.pagination,
.pagenums,
.pagelinks {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pagination a,
.pagination span,
.pagenums a,
.pagelinks a,
.prevlink,
.nextlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;
    padding: 0 16px;

    border: 1px solid rgba(139, 201, 184, .18);
    border-radius: 8px;

    background: rgba(18, 29, 40, .85);
    backdrop-filter: blur(8px);

    color: var(--text);
    transition:
        180ms ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.pagination a:hover,
.pagenums a:hover,
.pagelinks a:hover,
.prevlink:hover,
.nextlink:hover {

    background: rgba(139, 201, 184, .12);
    border-color: var(--accent);

    color: var(--accent);

    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .30);

    text-decoration: none;
}

.pagination .current,
.pagenums .current {

    background: var(--accent);
    color: #081016;

    border-color: var(--accent);

    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.pagination .current::before {
    content: none;
}


.pagination .current::before {
    content: "●";
    font-size: 0.7rem;
    margin-right: 6px;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 14, 0.84);
    backdrop-filter: blur(18px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
}

.lightbox-overlay.is-open {
    display: flex;
}

.lightbox-panel {
    position: relative;
    width: min(94vw, 1080px);
    max-height: 92vh;
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(8, 16, 24, 0.94);
    border: 1px solid rgba(139, 201, 184, 0.24);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.lightbox-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(4, 8, 12, 0.92);
    min-height: 240px;
}

.lightbox-frame img {
    display: block;
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    animation: lightbox-fade 220ms ease-out;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    top: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: rgba(6, 11, 16, 0.84);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.lightbox-close {
    right: 16px;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-meta {
    color: var(--text-soft);
    font-size: 0.92rem;
    padding: 0 4px 4px;
}

footer {
    text-align: right;
    margin-right: 12px;
}

@keyframes lightbox-fade {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 24px 20px;
    }
}

/* ==========================
   リンクカード
========================== */

a.cardlink {
    display: block;
    margin: 1.2rem 0;
    color: inherit;
    text-decoration: none;
}

.cardlinkbox {
    display: flex;
    gap: 16px;
    align-items: stretch;

    background: linear-gradient(145deg,
            rgba(18, 29, 40, .98),
            rgba(23, 39, 54, .96));

    border: 1px solid var(--border);
    border-radius: px;

    overflow: hidden;
    transition:
        180ms ease;
}

a.cardlink:hover .cardlinkbox {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .30);
}

.cardlinkimage {
    width: 180px;
    min-height: 120px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    background-color: var(--surface);
    flex-shrink: 0;
}

.cardlinktextbox {
    display: flex;
    flex-direction: column;

    padding: 16px;
    flex: 1;
}

.cardlinktitle {
    color: var(--text);

    font-size: 1.05rem;
    font-weight: 700;

    line-height: 1.5;

    margin-bottom: 8px;
}

.cardlinkdescription {
    color: var(--text-soft);

    font-size: .92rem;
    line-height: 1.7;

    flex: 1;
}

.cardlinkurl {
    margin-top: 12px;

    font-size: .8rem;

    color: var(--accent);

    opacity: .85;
}

/* 小さいカード */
/* PC */

.cardsize-S .cardlinkimage,
.cardsize-L .cardlinkimage {
    flex: 0 0 30%;
    width: auto;
    min-width: 180px;
}

.cardsize-S .cardlinktextbox,
.cardsize-L .cardlinktextbox {
    flex: 1;
}

@media (max-width:700px) {

    .cardlinkbox {
        flex-direction: column;
    }

    .cardsize-S .cardlinkimage,
    .cardsize-L .cardlinkimage {
        flex: none;
        width: 100%;
        min-width: 0;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

/* スマホ */
@media (max-width:700px) {

    .cardlinkbox {
        display: flex;
        flex-direction: column;
    }

    .cardlinkimage {
        width: 100%;
        height: 220px;
        min-height: 220px;

        flex: none;

        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .cardlinktextbox {
        width: 100%;
        padding: 16px 18px;
    }

}