/* ==========================================================================
   RYUHEIDOU / Pages
   下層ページ（GAME / ART / MATERIAL / 各作品ページ / 404）専用のパーツ。
   トップページには出てこないものだけをここに置く。
   components.css と同じ「切り貼り・ハードシャドウ」の語彙で作ること。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 下層ページのヒーロー
   トップの .hero は 1画面ぶん使うが、下層は「表紙」程度の高さに留める。
   -------------------------------------------------------------------------- */

.page-hero {
    position: relative;
    min-height: 320px;
    display: grid;
    align-content: end;
    gap: var(--sp-3);
    padding: var(--sp-7) var(--col-pad) var(--sp-6);
    overflow: hidden;
    border-bottom: var(--border-thick);
    background: var(--paper-3);
}

/* 画像は加工せずそのまま出す。
   キッカー・タイトル・リードはそれぞれ不透明な地色を持っているので、
   写真の上に紙色を重ねなくても読める。 */
.page-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero > *:not(.page-hero__bg) {
    position: relative;
    z-index: 1;
}

.page-hero__kicker {
    justify-self: start;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--paper-2);
    padding: 3px var(--sp-2);
    transform: rotate(var(--tilt-a));
}

.page-hero__title {
    justify-self: start;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 8.5vw, 2.5rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: var(--acid);
    border: var(--border-thick);
    box-shadow: var(--shadow);
    padding: 0.14em 0.3em 0.2em;
    transform: rotate(var(--tilt-b));
}

/* 日本語タイトルは Anton が出ないので極太ゴシックに落とす */
.page-hero__title--ja {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: clamp(1.375rem, 6.5vw, 1.875rem);
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
}

.page-hero__lead {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    background: var(--paper-2);
    padding: var(--sp-2) var(--sp-3);
    border-left: var(--bw-thick) solid var(--blue);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   2. パンくず
   -------------------------------------------------------------------------- */

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--col-pad);
    border-bottom: var(--border);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--ink-soft);
}

.crumbs a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--blue);
}

.crumbs a:hover {
    background: var(--acid);
}

.crumbs li + li::before {
    content: "/ ";
    color: var(--ink-faint);
}

.crumbs [aria-current="page"] {
    color: var(--ink);
}

/* 現在地の表示（ドロワー・フッターの共通ナビ） */
.drawer__link[aria-current="page"] {
    background: var(--blue);
    color: var(--blue-ink);
    border-color: var(--paper-2);
}

.drawer__link[aria-current="page"] small {
    color: var(--acid);
}

.footer__links a[aria-current="page"] {
    color: var(--acid);
}

.footer__links a[aria-current="page"]::before {
    content: "▸ ";
}

/* --------------------------------------------------------------------------
   3. 特徴カード（絵文字アイコン＋見出し＋説明）
   -------------------------------------------------------------------------- */

/* セクション冒頭のリード文 */
.lead {
    font-size: var(--fs-sm);
    line-height: var(--lh-body);
    padding-bottom: var(--sp-4);
    margin-bottom: var(--sp-5);
    border-bottom: 1px dashed var(--ink-faint);
}

.features {
    display: grid;
    gap: var(--sp-4);
}

.feature {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: var(--sp-2) var(--sp-3);
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    background: var(--paper-2);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.feature:nth-child(odd) {
    transform: rotate(var(--tilt-c));
}

.feature:nth-child(even) {
    transform: rotate(var(--tilt-b));
}

.feature:hover {
    transform: rotate(0deg) translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.feature__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 1.375rem;
    line-height: 1;
    background: var(--paper);
    border: var(--border);
    grid-row: span 2;
}

.feature__title {
    align-self: center;
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-base);
    line-height: 1.3;
}

.feature__text {
    grid-column: 2;
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

/* 特徴カードの中に置く箇条書き */
.feature__list {
    grid-column: 2;
    display: grid;
    gap: var(--sp-1);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.feature__list li {
    padding-left: 1em;
    text-indent: -1em;
}

.feature__list li::before {
    content: "▸ ";
    color: var(--blue);
}

/* 図版付きの特徴カード（画像を上に敷く） */
.feature--media {
    grid-template-columns: 1fr;
    padding: 0 0 var(--sp-4);
}

.feature--media > * {
    grid-column: 1;
}

.feature--media .feature__shot {
    border-bottom: var(--border);
    background: var(--paper-3);
}

.feature--media .feature__title,
.feature--media .feature__text,
.feature--media .feature__list {
    margin-inline: var(--sp-4);
}

.feature--media .feature__title {
    margin-top: var(--sp-3);
    margin-bottom: var(--sp-2);
}

/* --------------------------------------------------------------------------
   4. 手順（ステップ）
   -------------------------------------------------------------------------- */

.steps {
    display: grid;
    gap: var(--sp-4);
    counter-reset: step;
}

.step {
    position: relative;
    padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-6);
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--shadow-sm);
}

/* 手順番号を左肩に貼る */
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: -10px;
    left: -8px;
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    letter-spacing: 0.06em;
    background: var(--blue);
    color: var(--blue-ink);
    border: var(--border);
    padding: 1px var(--sp-2);
    transform: rotate(var(--tilt-a));
}

.step__title {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-base);
    line-height: 1.3;
    margin-bottom: var(--sp-2);
}

.step__text {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.step__shot {
    margin-top: var(--sp-3);
    border: var(--border);
    background: var(--paper-3);
}

/* --------------------------------------------------------------------------
   5. スクリーンショット（クリックで拡大）
   -------------------------------------------------------------------------- */

.shots {
    display: grid;
    gap: var(--sp-4);
}

.shot {
    position: relative;
    background: var(--paper-2);
    border: var(--border-thick);
    box-shadow: var(--shadow);
    transform: rotate(var(--tilt-c));
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.shot:nth-child(even) {
    transform: rotate(var(--tilt-b));
}

.shot:hover,
.shot:focus-within {
    transform: rotate(0deg) translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.shot img {
    width: 100%;
    border-bottom: var(--border);
    background: var(--paper-3);
}

.shot figcaption {
    padding: var(--sp-2) var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

/* BEFORE / AFTER の見比べ */
.compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
}

.compare .shot {
    transform: none;
}

.compare__label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    letter-spacing: 0.12em;
    background: var(--ink);
    color: var(--paper-2);
    padding: 2px var(--sp-2);
}

/* 拡大できる画像には虫めがねを出す */
.zoomable {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.zoomable::after {
    content: "＋";
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    line-height: 1;
    background: var(--acid);
    color: var(--ink);
    border: var(--bw) solid var(--ink);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.zoomable:hover::after,
.zoomable:focus-visible::after {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   6. 表（ショートカット一覧・サイズ表・方式一覧）
   カラムが 500px しかないので、横は必ずスクロールで逃がす。
   -------------------------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    border: var(--border);
    background: var(--paper);
    scrollbar-width: thin;
}

.zine-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
}

.zine-table th,
.zine-table td {
    padding: var(--sp-2) var(--sp-3);
    text-align: left;
    vertical-align: top;
    border-bottom: 1px dashed var(--ink-faint);
}

.zine-table thead th {
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--paper-2);
    border-bottom: none;
    white-space: nowrap;
}

.zine-table tbody tr:last-child td {
    border-bottom: none;
}

.zine-table tbody tr:hover {
    background: rgba(232, 234, 0, 0.28);
}

.zine-table td:first-child {
    white-space: nowrap;
}

/* キーボードキー／サイズ／方式のバッジ */
.kbd {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    background: var(--paper-2);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 1px 6px;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. メモ・注意・配布終了のお知らせ
   -------------------------------------------------------------------------- */

.tip {
    padding: var(--sp-3) var(--sp-4);
    background: var(--paper);
    border: var(--border);
    border-left: 6px solid var(--blue);
}

.tip + .tip {
    margin-top: var(--sp-3);
}

.tip h4 {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-sm);
    line-height: 1.3;
    margin-bottom: var(--sp-1);
}

.tip p,
.tip li {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

/* 「配布終了」など、強く伝えたいお知らせ */
.notice {
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-4);
    background: var(--ink);
    color: var(--paper-2);
    border: var(--border-thick);
    box-shadow: var(--shadow);
    transform: rotate(var(--tilt-c));
}

.notice__label {
    justify-self: start;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: var(--red);
    color: var(--paper-2);
    padding: 1px 6px;
}

.notice__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.notice__text {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   8. リンク（ストア・ダウンロード導線）
   -------------------------------------------------------------------------- */

.linkset {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

/* .card__link はカード全面を疑似要素で覆う（z-index: 4）。
   カード内のストアボタンはその上に出さないと押せなくなる。 */
.card__body .linkset {
    position: relative;
    z-index: 5;
    margin-top: var(--sp-3);
}

/* 外部リンクは矢印を斜めにして、サイト外へ出ることを示す */
.btn--ext::after {
    content: "↗";
}

.btn--sm {
    font-size: var(--fs-xs);
    padding: 4px var(--sp-3);
    border-width: var(--bw);
    box-shadow: var(--shadow-sm);
}

/* 大きな行動導線（「今すぐ遊ぼう」など） */
.cta {
    display: grid;
    justify-items: center;
    gap: var(--sp-3);
    padding: var(--sp-6) var(--sp-4);
    text-align: center;
    background: var(--blue);
    color: var(--blue-ink);
    border: var(--border-thick);
    box-shadow: var(--shadow);
}

.cta__title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--acid);
}

.cta__text {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
}

.cta .linkset {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   9. 価格カード
   -------------------------------------------------------------------------- */

.prices {
    display: grid;
    gap: var(--sp-5);
}

.price {
    position: relative;
    background: var(--paper-2);
    border: var(--border-thick);
    box-shadow: var(--shadow);
    transform: rotate(var(--tilt-c));
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.price:nth-child(even) {
    transform: rotate(var(--tilt-b));
}

.price:hover {
    transform: rotate(0deg) translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.price img {
    width: 100%;
    border-bottom: var(--border);
    background: var(--paper-3);
}

.price__body {
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
}

.price__name {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-lg);
    line-height: 1.2;
}

.price__value {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    line-height: 1;
    letter-spacing: 0.02em;
    background: var(--acid);
    border: var(--border);
    padding: 0.05em 0.2em 0.1em;
    margin: var(--sp-2) 0 var(--sp-3);
    transform: rotate(var(--tilt-a));
}

.price__list {
    display: grid;
    gap: var(--sp-1);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.price__list li {
    padding-left: 1.1em;
    text-indent: -1.1em;
}

.price__list li::before {
    content: "✓ ";
    color: var(--red);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   10. ギャラリー（サムネイル格子 → クリックで拡大）
   -------------------------------------------------------------------------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-2);
}

.gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--paper-3);
    border: var(--border);
    cursor: zoom-in;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur) var(--ease);
}

.gallery__item:hover,
.gallery__item:focus-visible {
    z-index: 2;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.gallery__item:hover img {
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   11. 画像の拡大表示モーダル（main.js が組み立てる）
   -------------------------------------------------------------------------- */

/* 暗幕の上に「刷った紙を1枚置いた」見え方にする。
   影は --ink だと暗幕に沈むので、リソの見当ズレに見立てて青を後ろに敷く。 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    /* minmax(0, 1fr) にしないと、行の min-height:auto で画像が画面外へはみ出す */
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    gap: var(--sp-5);
    padding: var(--sp-6) var(--sp-4) var(--sp-5);
    background: rgba(22, 18, 15, 0.95);
}

/* ざらつきは base.css の body::before が画面全体（z-index 9999）に敷いている。
   ここで重ねると二重になり、暗幕が白んでしまうので足さないこと。 */

.modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: var(--paper-3);
    border: var(--bw-thick) solid var(--paper-2);
    box-shadow: 10px 10px 0 0 var(--blue);
    transition: opacity var(--dur) var(--ease);
}

/* 次の画像が届くまでは前の画像を出したままにしない（main.js が付け外しする） */
.modal[data-loading="true"] img {
    opacity: 0;
}

/* 下のバーは「作品に貼った札」。少し傾けて切り貼り感を出す。
   DOM は ← / 枚数 / 説明 / → の順なので、そのまま4列に流れる。 */
.modal__bar {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
    max-width: min(100%, 40rem);
    padding: var(--sp-2) var(--sp-3);
    background: var(--paper-2);
    color: var(--ink);
    border: var(--border-thick);
    box-shadow: 5px 5px 0 0 var(--blue);
    transform: rotate(var(--tilt-c));
}

/* 狭い画面では1行に収まらない。折り返しに任せると → だけ別行に落ちるので、
   「送りボタンと枚数」を1行目、説明文を2行目に明示的に置く。 */
@media (max-width: 559.98px) {
    .modal__bar {
        grid-template-columns: auto auto auto;
        justify-content: center;
    }

    .modal__bar [data-modal="prev"] {
        grid-area: 1 / 1;
    }

    .modal__counter {
        grid-area: 1 / 2;
    }

    .modal__bar [data-modal="next"] {
        grid-area: 1 / 3;
    }

    .modal__caption {
        grid-area: 2 / 1 / 3 / 4;
        text-align: center;
    }
}

/* 枚数はセクション番号と同じブランドカラーのチップで揃える */
.modal__counter {
    flex: none;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    background: var(--blue);
    color: var(--blue-ink);
    padding: 2px var(--sp-2);
    transform: rotate(var(--tilt-a));
}

.modal__caption {
    max-width: 34ch;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

/* ボタンは .btn と同じ「押し込まれる」触り心地に揃える */
.modal__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    font-family: var(--font-mono);
    font-size: var(--fs-base);
    line-height: 1;
    color: var(--ink);
    background: var(--paper-2);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.modal__btn:hover,
.modal__btn:focus-visible {
    background: var(--acid);
    transform: translate(2px, 2px);
    box-shadow: none;
}

.modal__btn:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

/* 閉じるだけは「熱い印」の赤。暗幕の上でも迷わず見つかる。 */
.modal__close {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-4);
    background: var(--red);
    color: var(--paper-2);
    border-color: var(--paper-2);
    box-shadow: 3px 3px 0 0 var(--ink);
    transform: rotate(var(--tilt-d));
}

.modal__close:hover,
.modal__close:focus-visible {
    background: var(--acid);
    color: var(--ink);
    border-color: var(--ink);
    transform: rotate(var(--tilt-d)) translate(2px, 2px);
}

/* --------------------------------------------------------------------------
   12. 本文（コラムなどの長文）
   -------------------------------------------------------------------------- */

.prose {
    display: grid;
    gap: var(--sp-4);
    font-size: var(--fs-sm);
    line-height: var(--lh-body);
}

.prose h3 {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-lg);
    line-height: 1.3;
    background: var(--acid);
    border-left: var(--bw-thick) solid var(--ink);
    padding: var(--sp-2) var(--sp-3);
    transform: rotate(var(--tilt-c));
}

/* 小見出し（「使用する権限」など、h3 の中をさらに分ける用） */
.prose h4 {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1px dashed var(--ink-faint);
    padding-bottom: var(--sp-1);
    margin-bottom: calc(var(--sp-4) * -1 + var(--sp-2));
}

/* 箇条書きは .feature__list と同じ約束（青い ▸） */
.prose ul {
    display: grid;
    gap: var(--sp-2);
}

.prose li {
    padding-left: 1.1em;
    text-indent: -1.1em;
}

.prose li::before {
    content: "▸ ";
    color: var(--blue);
}

.prose figure {
    border: var(--border);
    background: var(--paper-3);
    box-shadow: var(--shadow-sm);
}

.prose figure img {
    width: 100%;
}

.prose a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--blue);
}

.prose a:hover {
    background: var(--acid);
}

/* --------------------------------------------------------------------------
   13. 404
   -------------------------------------------------------------------------- */

.err {
    display: grid;
    justify-items: center;
    gap: var(--sp-4);
    padding: var(--sp-8) var(--col-pad);
    text-align: center;
}

.err__code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 34vw, 9rem);
    line-height: 0.85;
    letter-spacing: 0.02em;
    color: transparent;
    -webkit-text-stroke: 4px var(--ink);
    transform: rotate(var(--tilt-a));
}

.err__title {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-xl);
    line-height: 1.25;
    background: var(--acid);
    border: var(--border-thick);
    box-shadow: var(--shadow);
    padding: var(--sp-2) var(--sp-4);
    transform: rotate(var(--tilt-b));
}

.err__text {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.err__count {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    border: 1px dashed var(--ink-faint);
    padding: var(--sp-2) var(--sp-3);
}

.err__count b {
    font-size: var(--fs-lg);
    color: var(--red);
}

.err__count button {
    font-size: var(--fs-xs);
    color: var(--ink-soft);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--blue);
}

.err__count button:hover {
    background: var(--acid);
    color: var(--ink);
}

/* 行き先の一覧 */
.err__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-2);
    width: 100%;
}

.err__links a {
    display: grid;
    gap: 1px;
    padding: var(--sp-2) var(--sp-3);
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    background: var(--paper-2);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.err__links a small {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

.err__links a:hover,
.err__links a:focus-visible {
    background: var(--acid);
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   14. ライセンス（許可 / 禁止 / 著作権）
   -------------------------------------------------------------------------- */

.license {
    display: grid;
    gap: var(--sp-4);
}

.license__card {
    padding: var(--sp-4);
    background: var(--paper-2);
    border: var(--border);
    box-shadow: var(--shadow-sm);
}

.license__card h3 {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-base);
    margin-bottom: var(--sp-3);
}

.license__mark {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    line-height: 1;
    border: var(--bw) solid currentColor;
}

.license__mark--ok {
    color: var(--blue);
}

.license__mark--ng {
    color: var(--red);
}

.license__card p {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.license__card ul {
    display: grid;
    gap: var(--sp-1);
    margin-top: var(--sp-3);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
}

.license__card li {
    padding-left: 1.1em;
    text-indent: -1.1em;
}

.license__card li::before {
    content: "・";
    color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   15. 制作環境・使用ツールの一覧
   -------------------------------------------------------------------------- */

.tools {
    display: grid;
    gap: var(--sp-3);
}

.tool {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sp-1) var(--sp-3);
    padding: var(--sp-3);
    background: var(--paper);
    border: var(--border);
}

.tool__name {
    grid-column: 1 / -1;
    font-family: var(--font-display);
    font-size: var(--fs-base);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tool__text {
    grid-column: 1 / -1;
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   14. ブログ

   本文は既存の .prose に乗せる。ただし .prose は元々ゲームの説明用で、
   段落・見出し・箇条書きしか出てこなかったので、記事で使う残りをここで足す。
   -------------------------------------------------------------------------- */

/* 番号付きリスト。ul と同じ ▸ が出てしまうので、番号に差し替える */
.prose ol {
    display: grid;
    gap: var(--sp-2);
    counter-reset: prose-ol;
}

.prose ol li::before {
    counter-increment: prose-ol;
    content: counter(prose-ol) ". ";
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--blue);
}

.prose blockquote {
    border-left: var(--border-thick);
    padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
    color: var(--ink-soft);
}

.prose pre {
    overflow-x: auto;
    padding: var(--sp-4);
    background: var(--ink);
    color: var(--paper-2);
    border: var(--border-thick);
    box-shadow: var(--shadow-sm);
}

.prose pre code {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: var(--lh-body);
    background: none;
    padding: 0;
    color: inherit;
}

/* 文中の `コード` */
.prose code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--paper-3);
    box-shadow: inset 0 0 0 1px var(--ink-faint);
    padding: 1px 5px;
}

.prose hr {
    height: 0;
    border-top: var(--border);
}

.prose figcaption {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
    padding: var(--sp-2) var(--sp-3);
}

/* ----- 記事一覧 -------------------------------------------------------- */

/* NEWS と同じ見た目にしたいが、あちらは高さを固定してスクロールさせる箱。
   一覧はページそのものなので、流し込みで持つ別部品にする。 */
.postlist {
    display: grid;
}

.post-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sp-1) var(--sp-3);
    padding: var(--sp-4) 0;
    border-bottom: 1px dashed var(--ink-faint);
}

.post-item:last-child {
    border-bottom: none;
}

.post-item__date {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--ink-soft);
    white-space: nowrap;
}

.post-item__cat {
    justify-self: start;
}

.post-item__title {
    grid-column: 1 / -1;
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs-lg);
    line-height: 1.3;
}

.post-item__title a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--blue);
}

.post-item__title a:hover {
    background: var(--acid);
}

.post-item__text {
    grid-column: 1 / -1;
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-soft);
}

.postlist__empty {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    padding: var(--sp-3);
}

/* ----- 前後の記事 ------------------------------------------------------ */

.postnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
    margin-top: var(--sp-5);
}

.postnav__link {
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-3) var(--sp-4);
    background: var(--paper-2);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.postnav__link:hover {
    background: var(--acid);
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* 「次の記事」は右端に寄せて、並びと向きを一致させる */
.postnav__link--next {
    grid-column: 2;
    text-align: right;
}

.postnav__label {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.postnav__title {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   中間幅（720〜1179px：レールが出ず、カラムが画面幅いっぱいになる帯）
   狙いと注意は layout.css 末尾の同じ帯のコメントを参照。
   こちらは pages.css で定義している部品のぶん。定義より後ろに置くこと。
   -------------------------------------------------------------------------- */
@media (min-width: 720px) and (max-width: 1179.98px) {

    /* auto-fit なので、要素が1つのときは段組みにならず横いっぱいに伸びる */
    .features,
    .steps,
    .shots,
    .prices,
    .tools {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
        align-items: start;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    }

    /* 長文は行長が伸びると急に読みにくくなるので、ここだけ measure で止める */
    .lead,
    .prose,
    .page-hero__lead {
        max-width: var(--measure);
    }
}
