/* フォントは index.html の <link> で読み込む（@import は描画ブロッキングのため廃止） */

:root {
    --fg: #f8f4ee;
    /* 小さめの補助テキストにも使うため、暗背景 #05060a で AA(4.5:1) を確保できる濃さに */
    --muted: rgba(248, 244, 238, 0.75);
    /* 和の配色：朱色（しゅいろ）×金色（こんじき）。夜のネオンに映える提灯の色味 */
    --accent: #ff6d4d;
    --accent-2: #ffd76a;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.14);
    /* ドット絵背景に合わせてピクセルフォントで統一（読み込み失敗時は従来系へ） */
    --display: "DotGothic16", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    --body: "DotGothic16", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;

    /* レイアウト */
    --maxw: 1080px;
    --section-pad: clamp(4.5rem, 10vw, 8rem);
    --content-inset: clamp(1.2rem, 5vw, 3rem); /* セクション/フッターの左右余白（ナビとは独立） */

    /* ナビ（上部バー・ネオン）— ここを変えれば位置・サイズ・色をまとめて調整できる */
    --nav-top: 1.2rem;          /* 上端からの距離 */
    --nav-inset: clamp(1rem, 4vw, 2.4rem); /* 左右端からの距離 */
    --nav-gap: 1.4rem;          /* 項目間 */
    --nav-link-size: 0.92rem;
    --neon-fg: #fff4ec;         /* リンク文字色（和紙のような温白色） */
    --neon: var(--accent);      /* ネオンの主色 */
    --neon-2: var(--accent-2);  /* ホバー時の差し色 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* 固定ナビ分のオフセット（アンカー移動時に見出しが隠れない） */
    scroll-padding-top: 5rem;
}

body {
    min-height: 100vh;
    /* 縦スクロールでコンテンツを背景の上に流す（横は固定） */
    overflow-x: hidden;
    color: var(--fg);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    /* WebGLが使えない環境でも夜のグラデーションが見えるフォールバック */
    background:
        linear-gradient(180deg, #0a0420 0%, #2a0a3a 42%, #46123e 50%, #0c0a14 50%, #05060a 100%);
    background-attachment: fixed;
}

/* 背景キャンバス（夜の高速道路シェーダー） */
#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    /* ドット絵感を保つため拡大時もにじませない */
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* キャンバスの上に薄いビネットを重ねて文字を読みやすく */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(120% 120% at 50% 35%, transparent 45%, rgba(5, 6, 10, 0.55) 100%);
}

main,
.footer {
    position: relative;
    z-index: 2;
}

/* main(z-index:2)と同値だと DOM 後勝ちで hero がナビを覆い、
   リンクがクリックできなくなるため、header は一段上に置く */
header {
    position: relative;
    z-index: 3;
}

/* ナビ可読性：画面上部にだけ薄い暗幕を敷き、明るい場面でも文字が沈まないようにする */
header::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 6rem;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 6, 10, 0.6) 0%, rgba(5, 6, 10, 0.24) 55%, transparent 100%);
}

/* キーボード操作者向けスキップリンク（通常は隠し、フォーカスで出現） */
.skip-link {
    position: fixed;
    top: 0.6rem;
    left: 50%;
    transform: translate(-50%, -150%);
    z-index: 10;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    background: rgba(8, 10, 18, 0.95);
    border: 1px solid var(--glass-border);
    color: var(--neon-fg);
    text-decoration: none;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translate(-50%, 0);
}

/* ---------- Navigation（上部バー・ネオンサイン風）---------- */
.nav {
    position: fixed;
    top: var(--nav-top);
    left: var(--nav-inset);
    right: var(--nav-inset);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nav-gap);
    z-index: 5;
}

.nav__brand {
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: var(--neon-fg);
    text-decoration: none;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.5),
        0 0 14px rgba(255, 109, 77, 0.5);
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav__brand:hover,
.nav__brand:focus-visible {
    color: #fff;
    text-shadow: 0 0 6px #fff, 0 0 20px var(--neon), 0 0 36px var(--neon-2);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__links a {
    display: inline-block;
    color: var(--neon-fg);
    text-decoration: none;
    font-size: var(--nav-link-size);
    font-weight: 500;
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow:
        0 0 3px rgba(255, 255, 255, 0.5),
        0 0 9px rgba(255, 109, 77, 0.55),
        0 0 18px rgba(255, 109, 77, 0.35);
    /* 点滅は brightness のみ（不透明度には触れない） */
    animation: neonFlicker 7s infinite;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
    color: #ffffff;
    text-shadow:
        0 0 4px #ffffff,
        0 0 12px var(--neon),
        0 0 26px var(--neon),
        0 0 44px var(--neon-2);
}

/* ネオンらしい微かなちらつき（opacity ではなく brightness を揺らす）*/
@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { filter: brightness(1); }
    20%, 24%, 55% { filter: brightness(0.72); }
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 4px;
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background: var(--neon-fg);
    border-radius: 2px;
    box-shadow: 0 0 6px var(--neon);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 7rem;
    position: relative;
}

.hero__title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.4rem, 5.5vw, 3.75rem);
    line-height: 1;
    letter-spacing: 2px;
    color: #fff;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.45),
        0 0 26px rgba(255, 109, 77, 0.45),
        0 0 60px rgba(255, 109, 77, 0.28),
        0 4px 30px rgba(0, 0, 0, 0.6);
}

/* 景色を眺めるボタン（ヒーローのタイトル直下）。
   ナビのネオンサインと同じ文法：短冊型の小さな看板に朱色のネオン文字を灯し、
   微かにちらつかせる。ホバーで金色（--accent-2）が差す */
.hero__bgonly {
    margin-top: 2rem;
    padding: 0.6rem 1.5rem;
    font-family: var(--display);
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-indent: 0.24em;   /* 末尾の字間で右に寄って見えるのを中央へ戻す */
    color: var(--neon-fg);
    text-shadow:
        0 0 3px rgba(255, 255, 255, 0.5),
        0 0 9px rgba(255, 109, 77, 0.55),
        0 0 18px rgba(255, 109, 77, 0.35);
    background: rgba(8, 10, 18, 0.55);
    /* カードの短冊タグと同じ角・朱色の縁 */
    border: 1px solid rgba(255, 109, 77, 0.4);
    border-radius: 2px;
    box-shadow:
        0 0 12px rgba(255, 109, 77, 0.18),
        inset 0 0 14px rgba(255, 109, 77, 0.08);
    cursor: pointer;
    /* ナビリンクと同じ微かなネオンのちらつき（brightness のみ） */
    animation: neonFlicker 7s infinite;
    transition: color 0.25s ease, border-color 0.25s ease,
                box-shadow 0.25s ease, text-shadow 0.25s ease;
}

.hero__bgonly:hover,
.hero__bgonly:focus-visible {
    color: #fff;
    border-color: rgba(255, 215, 106, 0.75);
    text-shadow: 0 0 4px #fff, 0 0 12px var(--neon), 0 0 26px var(--neon-2);
    box-shadow:
        0 0 22px rgba(255, 109, 77, 0.35),
        inset 0 0 18px rgba(255, 109, 77, 0.14);
}

/* ---------- ギャラリー（動くドット絵の展示室） ---------- */
.gallery-list {
    list-style: none;
    margin: 2.6rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 1.2rem;
}

.gallery-piece {
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.1rem;
}

/* 作品の額縁。中央寄せの暗い台紙にドット絵を置く */
.gallery-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 0.8rem;
    background: rgba(5, 6, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

/* 単画像（GIF/APNG/PNG）：拡大してもにじませない */
.pix-img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
}

/* スプライトシート（横並びコマ）を steps() でコマ送り再生。
   変数はジェネレータが作品ごとに埋める:
   --fw: 表示コマ幅 / --fh: 表示高さ / --n: コマ数 / --dur: 1周の秒数 */
.pix-anim {
    width: var(--fw);
    height: var(--fh);
    max-width: 100%;
    background-repeat: no-repeat;
    background-size: calc(var(--fw) * var(--n)) var(--fh);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: pix-cycle var(--dur) steps(var(--n)) infinite;
}

@keyframes pix-cycle {
    to { background-position-x: calc(var(--fw) * var(--n) * -1); }
}

/* 動きを抑えたい環境では 1コマ目で静止（GIF は止められないがスプライトは止まる） */
@media (prefers-reduced-motion: reduce) {
    .pix-anim { animation: none; }
}

.gallery-piece__meta {
    margin-top: 0.8rem;
}

.gallery-piece__title {
    display: block;
    font-family: var(--display);
    font-size: 1.05rem;
    color: #fff;
}

.gallery-piece__date {
    font-size: 0.78rem;
    color: var(--muted);
}

.gallery-piece__cap {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(243, 244, 248, 0.75);
}

/* ---------- 背景のみ表示モード（body.bg-only）---------- */
/* UI をフェードで隠し、夜景だけを残す。
   非表示側は pointer-events:none（クリックは背景へ素通り＝パッシングも効く）＋
   ui.js が inert を付けてフォーカス・支援技術からも外す */
header,
main,
.footer {
    transition: opacity 0.6s ease;
}

body.bg-only header,
body.bg-only main,
body.bg-only .footer,
body.bg-only .skip-link {
    opacity: 0;
    pointer-events: none;
}

/* 文字の可読性用ビネットも外し、背景そのものを見せる */
body.bg-only::after {
    opacity: 0;
}

body::after {
    transition: opacity 0.6s ease;
}

/* 戻るボタン：右上に小さく。入口ボタンと同じ短冊ネオンの意匠で、夜景の邪魔を
   しないよう普段は薄く灯し、触れると明るくなる */
.bgonly-exit {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    padding: 0.5rem 1.05rem;
    font-family: var(--display);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--neon-fg);
    text-shadow: 0 0 8px rgba(255, 109, 77, 0.35);
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(255, 109, 77, 0.35);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, box-shadow 0.25s ease;
}

.bgonly-exit:hover,
.bgonly-exit:focus-visible {
    opacity: 1;
    color: #fff;
    border-color: rgba(255, 215, 106, 0.75);
    box-shadow: 0 0 16px rgba(255, 109, 77, 0.3);
}

/* ヒーロー直下のお知らせカード（make:blog がタグ「お知らせ」の最新記事で自動挿入） */
.hero__news {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 2.6rem;
    width: min(34rem, 92vw);
}

.news-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(8, 10, 18, 0.55);
    text-decoration: none;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover,
.news-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 109, 77, 0.25), 0 10px 30px rgba(0, 0, 0, 0.45);
}

.news-card__label {
    flex-shrink: 0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding: 0.1rem 0.55rem;
    border: 1px solid rgba(255, 109, 77, 0.4);
    border-radius: 999px;
    background: rgba(255, 109, 77, 0.08);
}

.news-card__date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.news-card__title {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 狭い画面ではタイトルを2行目に折り返す */
@media (max-width: 480px) {
    .news-card { flex-wrap: wrap; }
    .news-card__title { flex-basis: 100%; white-space: normal; }
}

/* スクロール誘導 */
.hero__scroll {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
}

.hero__scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    box-shadow: 2px 2px 8px rgba(255, 109, 77, 0.3);
    animation: scrollBob 1.8s ease-in-out infinite;
}

@keyframes scrollBob {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

.hero__scroll:hover .hero__scroll-arrow,
.hero__scroll:focus-visible .hero__scroll-arrow {
    border-color: var(--accent-2);
}

/* ---------- Sections ---------- */
.section {
    padding: var(--section-pad) var(--content-inset);
}

/* 動く WebGL 背景の上でも本文コントラストが揺れないよう、薄い暗幕プレートを敷く */
.section__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(1.4rem, 3vw, 2.4rem);
    background: rgba(5, 6, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.section__inner--narrow {
    max-width: 720px;
}

.section__title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.7rem, 4.5vw, 2.7rem);
    line-height: 1.15;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.section__lead {
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 300;
}

/* ---------- Works（枠内の横スクロール）---------- */
.works {
    list-style: none;
    margin: 2.6rem 0 0;
    /* hover の浮き上がり(-4px)や影が overflow で切れないよう上下に余白を確保 */
    padding: 0.5rem 0.2rem 1.1rem;
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    /* Firefox のスクロールバー（WebKit 系は下の疑似要素で同じ見た目に） */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 109, 77, 0.45) rgba(255, 255, 255, 0.06);
}

.works:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 4px;
}

.works::-webkit-scrollbar { height: 6px; }
.works::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 999px; }
.works::-webkit-scrollbar-thumb { background: rgba(255, 109, 77, 0.45); border-radius: 999px; }

.card {
    /* 折り返さず一定幅で横に並べ、スクロール位置はカードの頭に吸着 */
    flex: 0 0 min(100%, 330px);
    scroll-snap-align: start;
    /* 角を立てて掛け軸・木箱のような静けさを出す */
    border-radius: 6px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(255, 109, 77, 0.5);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 109, 77, 0.15);
}

.card__link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    height: 100%;
    padding: 1.5rem 1.5rem 1.6rem;
    text-decoration: none;
    color: inherit;
}

.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.card__tag {
    align-self: flex-start;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    /* 短冊のような矩形タグ */
    border-radius: 2px;
    border: 1px solid rgba(255, 109, 77, 0.3);
    background: rgba(255, 109, 77, 0.06);
}

.card__title {
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: #fff;
}

.card__desc {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(243, 244, 248, 0.78);
}

.card__cta {
    margin-top: auto;
    padding-top: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
    transition: color 0.2s ease, transform 0.2s ease;
}

.card:hover .card__cta,
.card:focus-within .card__cta {
    color: #fff;
}

.section__more {
    display: inline-block;
    margin-top: 2rem;
    color: var(--neon-fg);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.section__more:hover,
.section__more:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ---------- Contact ---------- */
.links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 200px;
    padding: 1.2rem 1.4rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 109, 77, 0.2);
}

.link-card__label {
    font-family: var(--display);
    font-size: 1.05rem;
    color: #fff;
}

.link-card__handle {
    font-size: 0.9rem;
    color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 2rem var(--content-inset) 2.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 「今夜のドライブ」：日替わりの天気・月齢（app.js が注入。WebGL 不可時は出ない） */
.footer__night {
    opacity: 0.75;
    text-align: right;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    /* メニューはトグル直下のドロップダウン。開閉は opacity/transform、
       点滅は各リンクの brightness なので干渉しない。 */
    .nav__links {
        position: absolute;
        top: calc(100% + 0.7rem);
        right: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 1.1rem;
        padding: 1.2rem 1.4rem;
        border-radius: 8px;
        background: rgba(8, 10, 18, 0.92);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
        transform-origin: top right;
        transform: translateY(-8px) scale(0.98);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    }

    .nav__links.is-open {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

}

@media (max-width: 480px) {
    :root {
        --nav-link-size: 0.98rem;   /* タップしやすく少し大きめ */
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- ページ遷移 ---------- */
/* View Transitions API（対応ブラウザのみ有効・非対応は通常遷移のまま）。
   ページ間の移動をふわっとしたクロスフェードにする */
@view-transition {
    navigation: auto;
}

@keyframes vt-leave {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes vt-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

::view-transition-old(root) {
    animation: vt-leave 0.2s ease both;
}

::view-transition-new(root) {
    animation: vt-enter 0.3s ease both;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}

/* ---------- Blog ---------- */
/* 固定ナビと重ならないよう上に余白を足す */
.section--blog {
    padding-top: clamp(6rem, 14vh, 8.5rem);
    min-height: 70svh;
}

/* 記事一覧 */
.post-list {
    list-style: none;
    margin-top: 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.post-list__link {
    display: block;
    padding: 1rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(8, 10, 18, 0.45);
    text-decoration: none;
    color: var(--fg);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-list__link:hover,
.post-list__link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 109, 77, 0.25), 0 10px 30px rgba(0, 0, 0, 0.45);
}

.post-list__date {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.post-list__title {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.15rem;
    color: #fff;
}

.post-list__desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--muted);
}

/* タグチップ（一覧・記事ページ共通） */
.tag-chip {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.1rem 0.55rem;
    margin-right: 0.35rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(8, 10, 18, 0.45);
}

.post-list__tags {
    display: block;
    margin-top: 0.5rem;
}

.post__tags {
    margin-left: 0.6rem;
}

/* タグ絞り込みバー */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
}

.tag-filter__btn,
.tag-filter__reset {
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.45);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag-filter__btn:hover,
.tag-filter__btn:focus-visible,
.tag-filter__reset:hover,
.tag-filter__reset:focus-visible {
    border-color: var(--accent);
    color: #fff;
}

.tag-filter__btn[aria-pressed="true"] {
    border-color: var(--accent);
    color: #fff;
    background: rgba(255, 109, 77, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 109, 77, 0.25);
}

.post-list__empty {
    margin-top: 1.5rem;
    color: var(--muted);
}

/* 記事本文 */
.post__title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.5rem, 4.5vw, 2.2rem);
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 109, 77, 0.3);
}

.post__meta {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.post__body {
    margin-top: 2rem;
    line-height: 1.9;
}

.post__body h2 {
    margin: 2.2rem 0 0.8rem;
    font-size: 1.25rem;
    color: var(--accent-2);
}

.post__body h3 {
    margin: 1.8rem 0 0.6rem;
    font-size: 1.05rem;
    color: var(--fg);
}

.post__body p,
.post__body ul,
.post__body ol {
    margin: 0.9rem 0;
}

.post__body ul,
.post__body ol {
    padding-left: 1.4rem;
}

.post__body a {
    color: var(--accent);
    text-underline-offset: 3px;
}

.post__body code {
    padding: 0.1em 0.4em;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    font-family: var(--body);
    font-size: 0.92em;
}

.post__body pre {
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(8, 10, 18, 0.72);
    overflow-x: auto;
}

.post__body pre code {
    padding: 0;
    background: none;
}

.post__body blockquote {
    margin: 1.2rem 0;
    padding: 0.2rem 1.1rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
}

/* 記事内画像の額装（マット紙+額縁風。単体・ギャラリー共通） */
.post__body .img-s,
.post__body .img-m,
.post__body .img-l,
.post-gallery img {
    display: block;
    padding: 0.45rem;
    background: rgba(8, 10, 18, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.post__body .img-s,
.post__body .img-m,
.post__body .img-l {
    margin: 1.6rem auto;
}

.post__body .img-s { width: 33%; }
.post__body .img-m { width: 66%; }
.post__body .img-l { width: 100%; }

/* 連続画像の自動整列ギャラリー（ビルド時に post-gallery へまとめられる）。
   枚数と画面幅に応じて自動折返し、タイルは同じ縦横比に揃える */
.post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
    gap: 0.8rem;
    margin: 1.6rem 0;
}

.post-gallery img {
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.post__body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post__body hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--glass-border);
}

/* giscus（リアクション/コメント）の埋め込み枠 */
.post__reactions {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.post__back {
    margin-top: 3rem;
}

.post__back a {
    color: var(--accent);
    text-decoration: none;
}

.post__back a:hover,
.post__back a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* COMMENTS V2:START
   夜の高速道路 / 朱色ネオン / 読者の余白
   ========================================================= */

.comments {
    width: calc(100% - clamp(0rem, 3vw, 2rem));
    max-width: 100%;
    margin: 4.5rem auto 0;
    transform: none;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 109, 77, 0.28);
    position: relative;
}

.comments::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: min(13rem, 35%);
    height: 1px;
    background: var(--accent);
    box-shadow:
        0 0 8px rgba(255, 109, 77, 0.75),
        0 0 24px rgba(255, 109, 77, 0.35);
}

.comments__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.comments__eyebrow,
.comments__composer-kicker {
    margin: 0 0 0.25rem;
    color: var(--accent-2);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    opacity: 0.75;
}

.comments__title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    color: #fff;
    font-family: var(--display);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 14px rgba(255, 109, 77, 0.2);
}

.comments__count {
    display: inline-grid;
    place-items: center;
    min-width: 3.1rem;
    min-height: 1.65rem;
    padding: 0.12rem 0.5rem;
    border: 1px solid rgba(255, 215, 106, 0.35);
    border-radius: 2px;
    color: var(--accent-2);
    background: rgba(255, 215, 106, 0.05);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-shadow:
        0 0 8px rgba(255, 215, 106, 0.3);
}

.comments__intro {
    max-width: 22rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.65;
    text-align: right;
}

.comments__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(17rem, 0.85fr);
    gap: 1.2rem;
    align-items: start;
}

.comments__feed,
.comments__composer {
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background:
        linear-gradient(
            180deg,
            rgba(12, 10, 20, 0.72),
            rgba(5, 6, 10, 0.78)
        );
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.comments__feed {
    min-width: 0;
    overflow: hidden;
}

.comments__feed-bar {
    min-height: 2.7rem;
    padding: 0.65rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(248, 244, 238, 0.66);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.comments__signal {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(248, 244, 238, 0.46);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
}

.comments__signal i {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 7px rgba(255, 109, 77, 0.9);
    animation: commentsSignal 2.8s ease-in-out infinite;
}

.comments__list {
    display: grid;
    gap: 0;
    min-height: 10rem;
}

.comment {
    position: relative;
    padding: 1.05rem 1.1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(
            90deg,
            rgba(255, 109, 77, 0.025),
            transparent 35%
        );
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
    animation:
        commentEnter 0.38s both;
    animation-delay:
        calc(min(var(--comment-index), 6) * 45ms);
}

.comment:last-child {
    border-bottom: 0;
}

.comment:hover {
    background:
        linear-gradient(
            90deg,
            rgba(255, 109, 77, 0.07),
            rgba(255, 215, 106, 0.015) 55%,
            transparent
        );
}

.comment::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    width: 1px;
    background: var(--accent);
    opacity: 0;
    box-shadow:
        0 0 8px rgba(255, 109, 77, 0.7);
    transition: opacity 0.2s ease;
}

.comment:hover::before,
.comment--fresh::before {
    opacity: 0.85;
}

.comment__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.comment__identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.comment__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 109, 77, 0.35);
    border-radius: 3px;
    color: #fff4ec;
    background:
        linear-gradient(
            135deg,
            rgba(255, 109, 77, 0.14),
            rgba(255, 215, 106, 0.04)
        );
    box-shadow:
        inset 0 0 12px rgba(255, 109, 77, 0.06),
        0 0 12px rgba(255, 109, 77, 0.06);
    font-size: 0.85rem;
    text-shadow:
        0 0 8px rgba(255, 109, 77, 0.5);
}

.comment__author {
    overflow: hidden;
    color: rgba(248, 244, 238, 0.94);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.comment__number {
    color: rgba(255, 215, 106, 0.6);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.comment__time {
    color: rgba(248, 244, 238, 0.42);
    font-size: 0.68rem;
    white-space: nowrap;
}

.comment__body {
    margin: 0 0 0 2.65rem;
    color: rgba(248, 244, 238, 0.88);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    line-height: 1.9;
}

.comments__empty {
    min-height: 14rem;
    padding: 2.2rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    color: var(--muted);
}

.comments__empty-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 3.2rem;
    height: 3.2rem;
    border: 1px solid rgba(255, 109, 77, 0.2);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.3rem;
    background: rgba(255, 109, 77, 0.035);
    box-shadow:
        0 0 22px rgba(255, 109, 77, 0.08);
}

.comments__empty strong {
    display: block;
    color: rgba(248, 244, 238, 0.82);
    font-size: 0.88rem;
    font-weight: 400;
}

.comments__empty p {
    margin: 0.45rem 0 0;
    max-width: 25rem;
    color: rgba(248, 244, 238, 0.48);
    font-size: 0.77rem;
    line-height: 1.7;
}

.comments__error {
    margin: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 109, 77, 0.25);
    color: #ffb7a8;
    background: rgba(255, 109, 77, 0.05);
    font-size: 0.8rem;
    line-height: 1.7;
}

.comments__composer {
    position: sticky;
    top: 5.5rem;
    padding: 1.1rem;
}

.comments__composer-head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comments__composer-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    color: var(--accent);
    border: 1px solid rgba(255, 109, 77, 0.25);
    border-radius: 3px;
    background: rgba(255, 109, 77, 0.04);
}

.comments__composer-kicker {
    margin-bottom: 0.18rem;
}

.comments__composer h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
}

.comments__composer-head p:last-child {
    margin: 0.25rem 0 0;
    color: rgba(248, 244, 238, 0.46);
    font-size: 0.7rem;
}

.comments__form {
    display: grid;
    gap: 0.95rem;
}

.comments__field {
    display: grid;
    gap: 0.42rem;
}

.comments__label,
.comments__field-head {
    color: rgba(248, 244, 238, 0.64);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.comments__label small {
    margin-left: 0.35rem;
    color: rgba(248, 244, 238, 0.3);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.comments__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.comments__char-count {
    color: rgba(248, 244, 238, 0.32);
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.comments__char-count[data-near-limit="true"] {
    color: var(--accent-2);
}

.comments__field input,
.comments__field textarea {
    width: 100%;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    outline: none;
    color: var(--fg);
    background: rgba(5, 6, 10, 0.62);
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.7;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.comments__field textarea {
    min-height: 9rem;
    resize: vertical;
}

.comments__field input::placeholder,
.comments__field textarea::placeholder {
    color: rgba(248, 244, 238, 0.24);
}

.comments__field input:focus,
.comments__field textarea:focus {
    border-color: rgba(255, 109, 77, 0.52);
    background: rgba(7, 7, 13, 0.78);
    box-shadow:
        0 0 0 1px rgba(255, 109, 77, 0.09),
        0 0 18px rgba(255, 109, 77, 0.07);
}

.comments__turnstile {
    min-height: 68px;
    overflow-x: auto;
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.comments__turnstile.is-required {
    animation: commentsShake 0.35s ease;
    filter:
        drop-shadow(
            0 0 7px rgba(255, 109, 77, 0.35)
        );
}

.comments__submit {
    position: relative;
    min-height: 2.85rem;
    padding: 0.65rem 1rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 109, 77, 0.48);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    color: #fff4ec;
    background:
        linear-gradient(
            90deg,
            rgba(255, 109, 77, 0.15),
            rgba(255, 215, 106, 0.06)
        );
    font: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-shadow:
        0 0 8px rgba(255, 109, 77, 0.4);
    box-shadow:
        inset 0 0 18px rgba(255, 109, 77, 0.04);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.comments__submit::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-105%);
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 215, 106, 0.08),
            transparent
        );
    transition: transform 0.45s ease;
}

.comments__submit:hover:not(:disabled) {
    border-color: rgba(255, 215, 106, 0.7);
    color: #fff;
    box-shadow:
        0 0 18px rgba(255, 109, 77, 0.12),
        inset 0 0 22px rgba(255, 109, 77, 0.06);
}

.comments__submit:hover:not(:disabled)::before {
    transform: translateX(105%);
}

.comments__submit:active:not(:disabled) {
    transform: translateY(1px);
}

.comments__submit:disabled {
    cursor: wait;
    opacity: 0.78;
}

.comments__submit-label {
    grid-area: 1 / 1;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.comments__submit-spinner {
    grid-area: 1 / 1;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-2);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.7);
}

.comments__submit.is-loading
.comments__submit-label {
    opacity: 0;
    transform: translateY(3px);
}

.comments__submit.is-loading
.comments__submit-spinner {
    opacity: 1;
    transform: scale(1);
    animation: commentsSpin 0.7s linear infinite;
}

.comments__message {
    min-height: 1.4em;
    margin: 0;
    color: rgba(248, 244, 238, 0.5);
    font-size: 0.7rem;
    line-height: 1.5;
}

.comments__message[data-error="true"] {
    color: #ffb7a8;
}

.comments__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.comments__skeleton {
    padding: 1.25rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comments__skeleton span {
    display: block;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.055);
}

.comments__skeleton span::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 109, 77, 0.06),
            transparent
        );
    animation: commentsSkeleton 1.5s infinite;
}

.comments__skeleton span:first-child {
    width: 34%;
    height: 0.65rem;
}

.comments__skeleton span:last-child {
    width: 78%;
    height: 0.55rem;
    margin-top: 0.9rem;
}

.comment--fresh {
    animation:
        commentFresh 0.8s ease both;
}

@keyframes commentsSignal {
    0%, 100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

@keyframes commentsSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes commentsSkeleton {
    to {
        transform: translateX(100%);
    }
}

@keyframes commentsShake {
    0%, 100% {
        transform: translateX(0);
    }

    30% {
        transform: translateX(-3px);
    }

    70% {
        transform: translateX(3px);
    }
}

@keyframes commentEnter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes commentFresh {
    0% {
        opacity: 0;
        background: rgba(255, 109, 77, 0.16);
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .comments {
        margin-top: 3.5rem;
    }

    .comments__heading {
        display: block;
    }

    .comments__intro {
        margin-top: 0.7rem;
        text-align: left;
    }

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

    .comments__composer {
        position: static;
    }
}

@media (max-width: 560px) {
    .comments {
        width: 100%;
    }

    .comments__feed,
    .comments__composer {
        border-radius: 4px;
    }

    .comment {
        padding: 0.95rem;
    }

    .comment__header {
        align-items: flex-start;
    }

    .comment__meta {
        display: grid;
        justify-items: end;
        gap: 0.18rem;
    }

    .comment__body {
        margin-left: 0;
        margin-top: 0.9rem;
    }

    .comments__empty {
        align-items: flex-start;
        padding: 1.5rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .comments *,
    .comments *::before,
    .comments *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* COMMENTS V2:END */

/* COMMENTS V3:START
   Editorial vertical layout
   ========================================================= */

.comments {
    width: min(calc(100% - clamp(0rem, 3vw, 2rem)), 46rem);
    max-width: 100%;
    margin: 5rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 109, 77, 0.22);
}

.comments::before {
    width: min(8rem, 28%);
    box-shadow:
        0 0 7px rgba(255, 109, 77, 0.55),
        0 0 18px rgba(255, 109, 77, 0.18);
}

.comments__heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 2.2rem;
}

.comments__eyebrow {
    margin-bottom: 0.35rem;
    opacity: 0.58;
}

.comments__title {
    gap: 0.8rem;
    font-size: clamp(1.18rem, 2.3vw, 1.48rem);
    text-shadow: 0 0 12px rgba(255, 109, 77, 0.12);
}

.comments__count {
    min-width: auto;
    min-height: auto;
    padding: 0.05rem 0 0.05rem 0.75rem;
    border: 0;
    border-left: 1px solid rgba(255, 215, 106, 0.34);
    border-radius: 0;
    background: transparent;
    font-size: 0.68rem;
    opacity: 0.78;
    text-shadow: none;
}

.comments__intro {
    max-width: 32rem;
    margin: 0;
    color: rgba(248, 244, 238, 0.56);
    font-size: 0.78rem;
    line-height: 1.8;
    text-align: left;
}

.comments__grid {
    display: block;
}

.comments__feed,
.comments__composer {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.comments__feed {
    min-width: 0;
    overflow: visible;
}

.comments__feed-bar {
    min-height: auto;
    padding: 0 0 0.7rem;
    border-bottom: 1px solid rgba(248, 244, 238, 0.12);
    color: rgba(248, 244, 238, 0.48);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

.comments__signal {
    display: none;
}

.comments__list {
    display: block;
    min-height: 0;
}

.comment {
    position: relative;
    padding: 1.35rem 0.15rem 1.45rem 1rem;
    border-bottom: 1px solid rgba(248, 244, 238, 0.09);
    background: transparent;
}

.comment:last-child {
    border-bottom: 1px solid rgba(248, 244, 238, 0.09);
}

.comment:hover {
    background:
        linear-gradient(
            90deg,
            rgba(255, 109, 77, 0.025),
            transparent 42%
        );
}

.comment::before {
    top: 1.35rem;
    bottom: 1.45rem;
    width: 1px;
    opacity: 0.24;
    box-shadow: 0 0 6px rgba(255, 109, 77, 0.32);
}

.comment:hover::before,
.comment--fresh::before {
    opacity: 0.72;
}

.comment__header {
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.comment__identity {
    gap: 0;
}

.comment__avatar {
    display: none;
}

.comment__author {
    color: rgba(248, 244, 238, 0.88);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

.comment__meta {
    gap: 0.65rem;
}

.comment__number {
    color: rgba(255, 215, 106, 0.5);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.comment__time {
    color: rgba(248, 244, 238, 0.34);
    font-size: 0.64rem;
}

.comment__body {
    margin: 0;
    max-width: 41rem;
    color: rgba(248, 244, 238, 0.84);
    font-size: 0.88rem;
    line-height: 1.95;
}

.comments__empty {
    min-height: 0;
    padding: 2rem 0.25rem 2.1rem 1rem;
    justify-content: flex-start;
    gap: 0.9rem;
}

.comments__empty-mark {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 215, 106, 0.65);
    font-size: 1rem;
}

.comments__empty strong {
    color: rgba(248, 244, 238, 0.72);
    font-size: 0.82rem;
}

.comments__empty p {
    margin-top: 0.35rem;
    color: rgba(248, 244, 238, 0.4);
    font-size: 0.74rem;
    line-height: 1.75;
}

.comments__error {
    margin: 1rem 0;
    padding: 0.75rem 0 0.75rem 0.9rem;
    border: 0;
    border-left: 1px solid rgba(255, 109, 77, 0.5);
    background: transparent;
}

.comments__composer {
    position: static;
    margin-top: 2.6rem;
    padding: 1.6rem 0 0;
    border-top: 1px solid rgba(255, 215, 106, 0.15);
}

.comments__composer-head {
    gap: 0.65rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0;
    border-bottom: 0;
}

.comments__composer-mark {
    width: auto;
    height: auto;
    margin-top: 0.05rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 109, 77, 0.7);
    font-size: 0.95rem;
}

.comments__composer-kicker {
    color: rgba(255, 215, 106, 0.62);
    opacity: 1;
}

.comments__composer h3 {
    color: rgba(248, 244, 238, 0.9);
    font-size: 0.94rem;
}

.comments__composer-head p:last-child {
    margin-top: 0.3rem;
    color: rgba(248, 244, 238, 0.38);
    font-size: 0.68rem;
}

.comments__form {
    display: grid;
    gap: 1.15rem;
}

.comments__form > .comments__field:first-child {
    max-width: 18rem;
}

.comments__label,
.comments__field-head {
    color: rgba(248, 244, 238, 0.54);
    font-size: 0.68rem;
}

.comments__label small {
    color: rgba(248, 244, 238, 0.25);
}

.comments__field input {
    padding: 0.55rem 0.1rem;
    border: 0;
    border-bottom: 1px solid rgba(248, 244, 238, 0.16);
    border-radius: 0;
    background: transparent;
}

.comments__field textarea {
    min-height: 8rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid rgba(248, 244, 238, 0.13);
    border-radius: 2px;
    background: rgba(5, 6, 10, 0.32);
}

.comments__field input,
.comments__field textarea {
    color: rgba(248, 244, 238, 0.9);
    font-size: 0.82rem;
}

.comments__field input:focus {
    border-bottom-color: rgba(255, 109, 77, 0.58);
    background: transparent;
    box-shadow: 0 5px 12px -10px rgba(255, 109, 77, 0.7);
}

.comments__field textarea:focus {
    border-color: rgba(255, 109, 77, 0.42);
    background: rgba(5, 6, 10, 0.48);
    box-shadow:
        0 0 0 1px rgba(255, 109, 77, 0.05),
        0 0 16px rgba(255, 109, 77, 0.04);
}

.comments__field input::placeholder,
.comments__field textarea::placeholder {
    color: rgba(248, 244, 238, 0.2);
}

.comments__turnstile {
    min-height: 65px;
}

.comments__submit {
    justify-self: start;
    min-width: 10rem;
    min-height: 2.55rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid rgba(255, 109, 77, 0.38);
    border-radius: 2px;
    background: rgba(255, 109, 77, 0.045);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-shadow: none;
    box-shadow: none;
}

.comments__submit:hover:not(:disabled) {
    border-color: rgba(255, 215, 106, 0.5);
    color: #fff;
    background: rgba(255, 109, 77, 0.075);
    box-shadow: 0 0 14px rgba(255, 109, 77, 0.07);
}

.comments__message {
    max-width: 32rem;
    color: rgba(248, 244, 238, 0.42);
    font-size: 0.68rem;
}

.comments__skeleton {
    padding: 1.35rem 0.2rem 1.45rem 1rem;
    border-bottom: 1px solid rgba(248, 244, 238, 0.08);
}

.comments__skeleton span {
    background: rgba(248, 244, 238, 0.04);
}

@media (max-width: 560px) {
    .comments {
        width: 100%;
        margin-top: 4rem;
        padding-top: 1.6rem;
    }

    .comments__heading {
        margin-bottom: 1.8rem;
    }

    .comment {
        padding: 1.15rem 0.1rem 1.25rem 0.75rem;
    }

    .comment::before {
        top: 1.15rem;
        bottom: 1.25rem;
    }

    .comment__header {
        display: block;
    }

    .comment__meta {
        margin-top: 0.3rem;
        justify-content: flex-start;
    }

    .comments__empty {
        padding-left: 0.75rem;
    }

    .comments__composer {
        margin-top: 2.2rem;
        padding-top: 1.35rem;
    }

    .comments__form > .comments__field:first-child {
        max-width: none;
    }

    .comments__submit {
        width: 100%;
    }
}

/* COMMENTS V3:END */

/* COMMENTS TURNSTILE V4:START */
.comments__turnstile {
    min-height: 0;
    overflow: visible;
}
/* COMMENTS TURNSTILE V4:END */
