/* ==========================================================================
   桜泥棒PROJECT — ZINE/LABEL版 style.css
   桜泥棒BEERのロゴと販促物から言語を取っている。

   ロゴから読み取ったこと:
   - 曲線が一切ない。全部が切り紙の直線カット。→ border-radius は使わない。
     角は clip-path のポリゴンで「斜めに切り落とす」。
   - 濃い茶黒（#241a17）に白抜き。紙が白いのではなく、地が暗い。
   - 各文字の下に楕円の影。地面から浮いて立っている。
   販促物から読み取ったこと:
   - ラベルを隙間ゼロで敷き詰めるモザイク。余白ではなく密度で見せる。
   - その上に斜めの半透明マゼンタ帯。帯の中の文字も斜め。
   - 色は「一色」ではなく、ラベル由来の多色がぶつかっている状態。

   読めることは守る: 本文は傾けず・水平・16px以上・暗地には白文字を全不透明で。
   ========================================================================== */

:root {
    /* 地。暗い方が主で、紙は「貼られた札」として出てくる */
    --ground: #241a17;
    --ground-2: #170f0d;
    --ground-3: #352722;
    --paper: #f7f2e6;
    --paper-2: #ebe3d1;

    --ink: #1a120f;
    --ink-mid: #57493f;
    --ink-soft: #8a7a6c;

    /* 帯のマゼンタ。販促物の斜め帯 */
    --band: #c4194f;
    --band-ink: #8e0f37;
    --band-tint: #f7d3e0;

    /* ラベル由来の多色。ぶつけて使う */
    --teal: #3f93ab;
    --teal-deep: #1f6478;
    --orange: #e0722a;
    --crimson: #c0142c;
    --forest: #2f6236;
    --gold: #e8b62c;
    --cream: #efe3c6;

    /* 暗地の上で使う明るい版（文字色用） */
    --teal-lt: #8fd0e0;
    --orange-lt: #f5b183;
    --gold-lt: #f2d474;
    --band-lt: #ff9ebc;

    /* 角を斜めに切り落とす。丸みの代わりにこれを使う */
    --cut: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    --cut-r: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    --cut-sm: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    --cut-tag: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);

    --font: 'Zen Kaku Gothic New', -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
    --font-display: 'Zen Kaku Gothic New', -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    --font-cut: 'Stick', 'Zen Kaku Gothic New', sans-serif;
    --font-latin: 'Bevan', Georgia, serif;
    --font-mono: 'Space Mono', monospace;

    --wrap: 1080px;
    --measure: 40em;

    /* 旧テーマの変数名のエイリアス。admin.css の取りこぼし対策 */
    --color-bg: var(--ground);
    --color-text: var(--paper);
    --color-border: #4a3a33;
    --color-card-bg: var(--paper);
    --color-card-hover: var(--paper-2);
    --color-bg-sidebar: var(--ground-2);
    --color-text-muted: var(--ink-soft);
    --radius: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 104px; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--paper);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}

a { color: var(--gold-lt); text-decoration: none; }
a:hover { color: #fff; }

::selection { background: var(--band); color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
img { max-width: 100%; }

/* 白い紙の面。ここだけ文字が黒になる */
.on-paper { background: var(--paper); color: var(--ink); }
.on-paper a { color: var(--band-ink); }
.on-paper a:hover { color: var(--band); }

/* --------------------------------------------------------------------------
   斜めの帯 — 販促物の signature。文字も斜めのまま
   -------------------------------------------------------------------------- */

.band {
    background: var(--band);
    transform: skewY(-2.4deg);
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
}
.band-inner { transform: skewY(2.4deg); }

.band-marquee { display: inline-block; animation: band-slide 38s linear infinite; }
.band-marquee span {
    padding: 0 18px;
    font-family: var(--font-latin);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: #fff;
}
@keyframes band-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .band-marquee { animation: none; } }

/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--ground-2);
    border-bottom: 2px solid var(--ground-3);
}

.header-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 13px 32px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--paper); min-width: 0; }
.brand:hover { color: #fff; }
.brand-logo { display: block; height: 30px; width: auto; flex-shrink: 0; }
/* ロゴが既にワードマークなので、狭い幅では文字のブランド名を落とす */
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.02rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand-tagline {
    font-family: var(--font-latin);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--band-lt);
    white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }

.nav-item { position: relative; }
.nav-item > a {
    display: block;
    padding: 7px 12px;
    font-family: var(--font-cut);
    font-size: 0.98rem;
    color: var(--paper);
    white-space: nowrap;
    clip-path: var(--cut-sm);
    transition: background 0.12s ease, color 0.12s ease;
}
.nav-item > a:hover { background: var(--gold); color: var(--ink); }
.nav-item.is-current > a,
.nav-item[aria-current="page"] > a { background: var(--band); color: #fff; }

.nav-children {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 210px;
    padding: 7px;
    background: var(--paper);
    clip-path: var(--cut);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.13s ease, visibility 0.13s;
}
.nav-item:hover > .nav-children,
.nav-item:focus-within > .nav-children { opacity: 1; visibility: visible; }
.nav-children a {
    display: block;
    padding: 7px 13px;
    font-size: 0.88rem;
    color: var(--ink);
    white-space: nowrap;
    clip-path: var(--cut-sm);
}
.nav-children a:hover { background: var(--band); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   本体・フッター
   -------------------------------------------------------------------------- */

.main { max-width: var(--wrap); margin: 0 auto; padding: 40px 32px 84px; min-width: 0; }

/* 紙の上に載る本文ブロック（記事など） */
.paper-sheet {
    background: var(--paper);
    color: var(--ink);
    clip-path: var(--cut);
    padding: 44px 48px 52px;
    margin: 0 auto;
}
.paper-sheet a { color: var(--band-ink); }
.paper-sheet a:hover { color: var(--band); }

.site-footer { background: var(--ground-2); border-top: 2px solid var(--ground-3); }
.footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 34px 32px 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 22px 40px;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 0.86rem;
    color: #c9bdae;
}
.footer-logo { display: block; height: 46px; width: auto; margin-bottom: 10px; }
.footer-inner a { color: #c9bdae; }
.footer-inner a:hover { color: #fff; }
.footer-location { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-soft); }

.sidebar-title { padding: 4px; font-family: var(--font-display); font-weight: 900; }
.sidebar-title a { color: var(--paper); }
.sidebar-footer { margin-top: 24px; padding-top: 14px; border-top: 2px solid var(--ground-3); font-size: 0.84rem; }
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   モザイク — ラベルを隙間ゼロで敷き詰める
   -------------------------------------------------------------------------- */

.mosaic {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-auto-rows: 74px;
    gap: 0;
    background: var(--ground-2);
}
.mosaic-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 8px 9px;
    font-family: var(--font-latin);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    line-height: 1.25;
}
.mosaic-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mosaic-tile > span { position: relative; }
.t-w2 { grid-column: span 2; }
.t-h2 { grid-row: span 2; }
.t-w2h2 { grid-column: span 2; grid-row: span 2; }

/* --------------------------------------------------------------------------
   トップのヒーロー
   実物の販促ビジュアル（ラベルのコラージュ＋斜めマゼンタ帯）を1枚で敷く。
   画像そのものに斜め帯とスローガンが入っているので、CSSの .hero-band は使わない。
   下端の白い連絡先バンドは枠でトリミングして隠す。
   -------------------------------------------------------------------------- */

.hero-stack { position: relative; margin: 0 -32px; }

.hero-art {
    position: relative;
    overflow: hidden;
    /* 1080pxの wrap 基準。狭い画面では比率を保って縮む */
    height: min(615px, 57vw);
    background: var(--ground-2);
}
/* 画像を枠より大きく引き伸ばして（オーバースキャン）、元画像の
   白い外枠・下端の連絡先バンド・円形のロゴバッジを全部枠外に追い出す。
   バッジは下端バンドより上（元画像 y≈500）まで侵入しているので、
   見せる範囲の下端は y≤497 に収めること。
   max-width: none は base の img { max-width: 100% } を外すために必須。 */
.hero-art img {
    position: absolute;
    top: -17.8px;
    left: -2%;
    width: 118%;
    max-width: none;
    height: auto;
    display: block;
}
/* 下端を地の色に溶かして、切れ目ではなく続きに見せる */
.hero-art::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(36, 26, 23, 0), var(--ground));
}

.hero-band {
    position: absolute;
    left: -12px;
    right: -12px;
    top: 46%;
    z-index: 3;
    background: rgba(196, 25, 79, 0.94);
    transform: skewY(-4deg) rotate(-1deg);
    padding: 26px 0;
}
.hero-band-inner {
    transform: skewY(4deg);
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 44px;
}
.hero-band-sub {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    color: #ffd7e3;
    margin-bottom: 4px;
}
.hero-band-title {
    margin: 0;
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(1.5rem, 0.7rem + 2.3vw, 2.6rem);
    line-height: 1.26;
    color: #fff;
}
.hero-band-title .q { color: #ffd7e3; }

.hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 44px;
    align-items: start;
    padding: 42px 32px 10px;
}
.hero-body h1 {
    margin: 0 0 20px;
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(1.7rem, 1rem + 1.9vw, 2.5rem);
    line-height: 1.34;
    color: var(--paper);
}
.hero-body h1 em { font-style: normal; color: var(--gold-lt); }
.hero-body p { margin: 0 0 26px; max-width: 30em; color: #d8cbbd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }

.hero-aside { display: flex; flex-direction: column; gap: 14px; }

/* 立て札。ロゴの「下に楕円の影」を引き継ぐ */
.placard {
    background: var(--paper);
    color: var(--ink);
    clip-path: var(--cut);
    padding: 20px 22px;
    position: relative;
}
.placard-label {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.placard-big { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1.2; }
.placard-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.86rem;
    padding: 6px 0;
    border-bottom: 1px dashed #d3c8b2;
}
.placard-row:last-child { border-bottom: none; }
.placard-row span:first-child { color: var(--ink-mid); }

.cast-shadow { position: relative; }
.cast-shadow::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -13px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 72%);
    pointer-events: none;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 9px 18px;
    background: var(--forest);
    color: #fff;
    font-family: var(--font-cut);
    font-size: 0.96rem;
    clip-path: var(--cut-sm);
}
.status-chip::before { content: ""; width: 10px; height: 10px; background: var(--gold); flex-shrink: 0; }
.status-chip:hover { background: #3a7a42; color: #fff; }
.status-chip.is-closed { background: var(--ground-3); color: #c9bdae; }
.status-chip.is-closed::before { background: var(--ink-soft); }

/* --------------------------------------------------------------------------
   見出し
   -------------------------------------------------------------------------- */

.breadcrumbs { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 20px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--gold-lt); }
.crumb-sep { margin: 0 8px; color: var(--band-lt); }

.page-header { margin-bottom: 30px; }
.page-header h1 {
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(1.8rem, 1.1rem + 1.7vw, 2.5rem);
    line-height: 1.3;
    margin: 0 0 12px;
    color: var(--paper);
}
.paper-sheet .page-header h1, .on-paper .page-header h1 { color: var(--ink); }
.paper-sheet .row-heading, .on-paper .row-heading { color: var(--ink); }
.page-summary { margin: 0; max-width: var(--measure); color: #cdbfb1; }
.on-paper .page-summary, .paper-sheet .page-summary { color: var(--ink-mid); }

.section-head { display: flex; align-items: center; gap: 14px; margin: 52px 0 20px; }
.section-head h2 {
    margin: 0;
    font-family: var(--font-display); font-weight: 900;
    font-size: 1.44rem;
    line-height: 1.3;
    background: var(--band);
    color: #fff;
    padding: 5px 16px 6px;
    clip-path: var(--cut-sm);
    transform: rotate(-0.8deg);
}
.section-head-num {
    font-family: var(--font-latin);
    font-size: 2.3rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink-soft);
    flex-shrink: 0;
}
.section-head-link {
    margin-left: auto;
    font-family: var(--font-cut);
    font-size: 0.96rem;
    color: var(--gold-lt);
    border-bottom: 2px solid var(--gold);
}
.section-head-link:hover { color: #fff; border-color: #fff; }

/* --------------------------------------------------------------------------
   タグ — 平行四辺形に切る
   -------------------------------------------------------------------------- */

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-group { margin-bottom: 34px; }
.tag-group h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 900; font-size: 1.16rem; color: var(--paper); }
.paper-sheet .tag-group h2, .on-paper .tag-group h2 { color: var(--ink); }
.tag-pill {
    display: inline-flex;
    align-items: center;
    background: var(--ground-3);
    color: var(--paper);
    padding: 3px 15px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    clip-path: var(--cut-tag);
}
.on-paper .tag-pill, .paper-sheet .tag-pill { background: var(--paper-2); color: var(--ink); }
a.tag-pill:hover { background: var(--band); color: #fff; }

/* --------------------------------------------------------------------------
   カード — 札。角を斜めに切って、色の影をつける
   -------------------------------------------------------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 20px; margin: 22px 0; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    clip-path: var(--cut);
    padding: 20px;
    overflow: hidden;
    transition: transform 0.14s ease, filter 0.14s ease;
}
.card:hover { color: var(--ink); transform: translate(-3px, -3px); }

/* 一枚ごとに違う色の影（版ずれ）。drop-shadow は clip-path の形に沿う */
.card-grid .card:nth-child(4n+1) { filter: drop-shadow(7px 7px 0 var(--crimson)); }
.card-grid .card:nth-child(4n+2) { filter: drop-shadow(7px 7px 0 var(--teal)); }
.card-grid .card:nth-child(4n+3) { filter: drop-shadow(7px 7px 0 var(--gold)); }
.card-grid .card:nth-child(4n+4) { filter: drop-shadow(7px 7px 0 var(--forest)); }
.card-grid .card:hover { filter: drop-shadow(11px 11px 0 var(--band)); }

.card-highlight { background: var(--gold); }
.card-dark { background: var(--ground-3); color: var(--paper); }
.card-dark .card-summary { color: #cdbfb1; }

.card-icon { font-size: 1.9rem; line-height: 1; margin-bottom: 12px; }
.card-thumb { display: block; height: 128px; width: calc(100% + 40px); object-fit: cover; margin: -20px -20px 14px; }
.card-kicker { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 5px; }
.card-title { font-family: var(--font-display); font-weight: 900; font-size: 1.04rem; line-height: 1.44; }
.card-summary { color: var(--ink-mid); font-size: 0.86rem; line-height: 1.8; margin-top: 8px; }

/* 記録の行 */
.post-list { display: flex; flex-direction: column; margin: 22px 0; }
.post-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 12px;
    border-bottom: 1px solid var(--ground-3);
    color: var(--paper);
    transition: background 0.13s ease, transform 0.13s ease;
}
.post-row:hover { background: var(--ground-3); color: #fff; transform: translateX(7px); }
.post-row-thumb { flex-shrink: 0; width: 86px; height: 86px; object-fit: cover; clip-path: var(--cut-sm); }
.post-row-body,
.post-row-main { flex: 1; min-width: 0; }
.post-row-title { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; line-height: 1.45; }
.post-row-summary { color: #c0b2a4; font-size: 0.87rem; margin-top: 4px; }
.post-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   バッジ
   -------------------------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 2px 12px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: var(--ground-3);
    color: var(--paper);
    clip-path: var(--cut-tag);
}
.on-paper .badge, .paper-sheet .badge, .card .badge, .row-card .badge { background: var(--paper-2); color: var(--ink); }
.status-available { background: var(--forest) !important; color: #fff !important; }
.status-preparing { background: var(--orange) !important; color: #2a1a0c !important; }
.status-in-use { background: var(--teal-deep) !important; color: #fff !important; }
.status-partial { background: var(--gold) !important; color: #2a2208 !important; }
.status-ended { background: #6e6058 !important; color: #fff !important; }
.status-stock, .status-default { background: var(--paper-2) !important; color: var(--ink) !important; }

/* --------------------------------------------------------------------------
   横スクロール行
   -------------------------------------------------------------------------- */

.row-list { display: flex; flex-direction: column; gap: 46px; margin: 26px 0; }
.row-section { min-width: 0; }
.row-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--font-display); font-weight: 900; font-size: 1.24rem; color: var(--paper); }
.row-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink); background: var(--gold); padding: 2px 11px; clip-path: var(--cut-tag); }
.row-nav { margin-left: auto; display: flex; gap: 7px; }
.row-nav-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--ground-3);
    color: var(--paper);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    clip-path: var(--cut-sm);
    transition: background 0.12s ease, color 0.12s ease;
}
.row-nav-btn:hover { background: var(--gold); color: var(--ink); }

.row-scroll-wrap { position: relative; margin: 0 -32px; }
.row-scroll-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 14px;
    width: 52px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(36, 26, 23, 0), var(--ground));
}
.row-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 32px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--ground-3) transparent;
}
.row-scroll::-webkit-scrollbar { height: 9px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--ground-3); }

.row-card {
    flex: 0 0 228px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    clip-path: var(--cut);
    overflow: hidden;
    transition: transform 0.14s ease, filter 0.14s ease;
}
.row-scroll .row-card:nth-child(4n+1) { filter: drop-shadow(6px 6px 0 var(--crimson)); }
.row-scroll .row-card:nth-child(4n+2) { filter: drop-shadow(6px 6px 0 var(--teal)); }
.row-scroll .row-card:nth-child(4n+3) { filter: drop-shadow(6px 6px 0 var(--gold)); }
.row-scroll .row-card:nth-child(4n+4) { filter: drop-shadow(6px 6px 0 var(--forest)); }
.row-card:hover { color: var(--ink); transform: translate(-3px, -3px); filter: drop-shadow(10px 10px 0 var(--band)); }

.row-card-image { height: 144px; background: var(--paper-2); flex-shrink: 0; position: relative; }
.row-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.2rem;
    opacity: 0.4;
    background-image: repeating-linear-gradient(-45deg, rgba(26, 18, 15, 0.09) 0 10px, transparent 10px 20px);
}
.row-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.row-card-title { font-family: var(--font-display); font-weight: 900; font-size: 0.96rem; line-height: 1.44; }
.row-card-summary { color: var(--ink-mid); font-size: 0.82rem; line-height: 1.74; }

/* --------------------------------------------------------------------------
   カンバン
   -------------------------------------------------------------------------- */

.kanban {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(258px, 1fr);
    gap: 20px;
    margin: 26px -32px 0;
    padding: 8px 32px 22px;
    overflow-x: auto;
    align-items: start;
}
.kanban-col { background: var(--ground-2); clip-path: var(--cut); padding: 16px 15px 20px; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.kanban-col-head { display: flex; align-items: center; gap: 9px; padding: 0 3px; }
.kanban-col-title { font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.kanban-col-count { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-soft); }
.kanban-col-rule { height: 6px; background: var(--ink-soft); margin: -2px 3px 0; }
.kanban-col-rule.is-available { background: var(--forest); }
.kanban-col-rule.is-preparing { background: var(--orange); }
.kanban-col-rule.is-in-use { background: var(--teal); }
.kanban-col-rule.is-ended { background: #6e6058; }

.kanban-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: var(--paper);
    color: var(--ink);
    clip-path: var(--cut-sm);
    padding: 14px 15px;
    transition: transform 0.13s ease, filter 0.13s ease;
}
.kanban-col .kanban-card:nth-child(odd) { filter: drop-shadow(5px 5px 0 var(--crimson)); }
.kanban-col .kanban-card:nth-child(even) { filter: drop-shadow(5px 5px 0 var(--teal)); }
.kanban-card:hover { color: var(--ink); transform: translate(-3px, -3px); filter: drop-shadow(9px 9px 0 var(--band)); }
.kanban-card-title { font-family: var(--font-display); font-weight: 900; font-size: 0.96rem; line-height: 1.46; }
.kanban-card-summary { color: var(--ink-mid); font-size: 0.81rem; line-height: 1.74; }
.kanban-card-thumb { display: block; width: 100%; height: 92px; object-fit: cover; clip-path: var(--cut-sm); }
.kanban-empty { font-size: 0.82rem; color: var(--ink-soft); padding: 4px; }

/* --------------------------------------------------------------------------
   パーツリスト
   -------------------------------------------------------------------------- */

.parts-toolbar {
    position: sticky;
    top: 57px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    align-items: center;
    margin: 22px -32px 0;
    padding: 14px 32px;
    background: var(--ground-2);
}
.parts-toolbar .input { flex: 1 1 200px; max-width: 268px; }
.parts-toolbar .button { margin-left: auto; }
.parts-count { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink); background: var(--gold); padding: 4px 13px; clip-path: var(--cut-tag); white-space: nowrap; }

.category-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 30px; }
.category-jump a {
    padding: 5px 15px;
    background: var(--ground-3);
    color: var(--paper);
    font-family: var(--font-cut);
    font-size: 0.94rem;
    clip-path: var(--cut-sm);
}
.category-jump a:hover { background: var(--band); color: #fff; }
.category-jump .muted { color: #a2948a; font-size: 0.8rem; }

.part-card-meta { display: flex; gap: 7px; align-items: center; }
.part-card-price { margin-top: auto; padding-top: 6px; font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--band-ink); }
.muted { color: var(--ink-soft); font-size: 0.8rem; }

.part-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(166px, 1fr));
    gap: 16px 20px;
    margin: 26px 0;
    padding: 22px 24px;
    background: var(--ground-2);
    clip-path: var(--cut);
}
.meta-label { display: block; font-family: var(--font-mono); font-size: 0.65rem; color: var(--ink-soft); margin-bottom: 2px; }

.photo-gallery { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0; }
.photo-gallery img { width: 164px; height: 164px; object-fit: cover; clip-path: var(--cut-sm); }

/* --------------------------------------------------------------------------
   記事本文 — 白い紙の上。傾けない
   -------------------------------------------------------------------------- */

.page-article { max-width: 46em; margin: 0 auto; }
.page-article h1 {
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.35rem);
    line-height: 1.36;
    margin: 0 0 14px;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-mono); font-size: 0.73rem; color: var(--ink-soft); margin-bottom: 20px; }
.article-lead {
    margin: 0 0 22px;
    max-width: var(--measure);
    font-family: var(--font-cut);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--ink);
}

/* 記事直下のベタ書き h2（パーツ詳細など）。page-content の h2 と同じ扱い */
.page-article > h2 {
    font-family: var(--font-display); font-weight: 900;
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 2.2em 0 0.8em;
    display: inline-block;
    background: var(--band);
    color: #fff;
    padding: 4px 15px 5px;
    clip-path: var(--cut-sm);
}
.part-detail .muted a { color: var(--band-ink); }

.page-content { margin-top: 26px; font-size: 1.06rem; line-height: 1.96; color: var(--ink); }
.page-content > * { max-width: var(--measure); }
.page-content > .md-table, .page-content > .photo-gallery, .page-content > img { max-width: 100%; }
.page-content p { margin: 0 0 1.5em; }

.page-content h2 {
    font-family: var(--font-display); font-weight: 900;
    font-size: 1.34rem;
    line-height: 1.4;
    margin: 2.7em 0 0.9em;
    display: inline-block;
    background: var(--band);
    color: #fff;
    padding: 4px 15px 5px;
    clip-path: var(--cut-sm);
}
.page-content h3 {
    font-family: var(--font-display); font-weight: 900;
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 2.2em 0 0.7em;
    padding-left: 14px;
    border-left: 6px solid var(--band);
}
.page-content h2 + h3 { margin-top: 1.4em; }

.page-content ul, .page-content ol { padding-left: 1.4em; margin: 0 0 1.5em; }
.page-content li { margin-bottom: 0.5em; }
.page-content li::marker { color: var(--band); }

.page-content > img { display: block; clip-path: var(--cut); margin: 2.2em 0; height: auto; }

.page-eyecatch { display: block; width: 100%; max-height: 400px; object-fit: cover; clip-path: var(--cut); margin-bottom: 0; }

.page-content blockquote {
    margin: 2.2em 0;
    padding: 20px 24px;
    background: var(--ground);
    color: var(--paper);
    clip-path: var(--cut);
    font-family: var(--font-cut);
    font-size: 1.14rem;
    line-height: 1.75;
}

.page-content code { font-family: var(--font-mono); background: var(--gold); color: var(--ink); padding: 2px 6px; font-size: 0.88em; }
.page-content pre {
    font-family: var(--font-mono);
    background: var(--ground-2);
    color: var(--paper);
    padding: 18px 20px;
    clip-path: var(--cut-sm);
    overflow-x: auto;
    font-size: 0.84rem;
    line-height: 1.7;
    margin: 2.2em 0;
}
.page-content pre code { background: none; padding: 0; color: inherit; }
.page-content hr { border: none; border-top: 2px dashed #d3c8b2; margin: 3em 0; }
.page-content a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   本文中のリンクリスト

   リンクだけの行が並んでいる所は、札型のボタンにする。
   対象は、全部の項目がリンクだけの箇条書きと、2行以上続くリンクだけの段落。
   「Webサイト：（リンク）」のように文章が入る行は、普通の箇条書き・段落のまま。
   （リンクだけの行の印 link-line は、site-app/inc/render.php が付ける）
   -------------------------------------------------------------------------- */

.page-content p.link-line:has(+ p.link-line),
.page-content p.link-line + p.link-line,
.page-content ul:not(:has(> li:not(.link-line))) > li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    margin: 0 8px 8px 0;
    max-width: 100%;
    background: var(--ground);
    color: var(--paper);
    font-family: var(--font-cut);
    font-size: 1.02rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    clip-path: var(--cut-sm);
    transition: background 0.13s ease, transform 0.13s ease;
}
.page-content p.link-line:has(+ p.link-line):hover,
.page-content p.link-line + p.link-line:hover,
.page-content ul:not(:has(> li:not(.link-line))) > li:hover {
    background: var(--band);
    transform: translate(-2px, -2px);
}
/* 札の中のリンクは地の文と同じ見た目にして、札ごと1つの部品に見せる */
.page-content p.link-line:has(+ p.link-line) > a,
.page-content p.link-line + p.link-line > a,
.page-content ul:not(:has(> li:not(.link-line))) > li > a {
    color: inherit;
    text-decoration: none;
}
.page-content p.link-line:has(+ p.link-line) > a:hover,
.page-content p.link-line + p.link-line > a:hover,
.page-content ul:not(:has(> li:not(.link-line))) > li > a:hover { color: #fff; }

/* 全部の項目がリンクだけの箇条書きは、札を横に並べる */
.page-content ul:not(:has(> li:not(.link-line))) {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding-left: 0;
    margin: 1.2em 0 1.8em;
    list-style: none;
    max-width: 100%;
}

/* テンプレートから直接書くとき用の明示クラス（:has() に頼らない） */
.link-cards { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.link-card {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    background: var(--ground);
    color: var(--paper);
    font-family: var(--font-cut);
    font-size: 1.02rem;
    clip-path: var(--cut-sm);
    transition: background 0.13s ease, transform 0.13s ease;
}
.link-card:hover { background: var(--band); color: #fff; transform: translate(-2px, -2px); }
.link-card::after { content: "→"; font-family: var(--font); opacity: 0.7; }
.paper-sheet .link-card, .on-paper .link-card { background: var(--ground); color: var(--paper); }

/* --------------------------------------------------------------------------
   表
   -------------------------------------------------------------------------- */

.md-table {
    border-collapse: collapse;
    width: 100%;
    margin: 26px 0;
    font-size: 0.92rem;
    background: var(--paper-2);
    color: var(--ink);
    clip-path: var(--cut-sm);
}
.md-table th, .md-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid #d8cdb8; }
.md-table thead th { background: var(--ground); color: var(--paper); font-family: var(--font-mono); font-size: 0.69rem; white-space: nowrap; }
.md-table tr:last-child td { border-bottom: none; }

.empty-note { color: #c0b2a4; background: var(--ground-2); clip-path: var(--cut); padding: 20px 24px; font-size: 0.92rem; }
.paper-sheet .empty-note, .on-paper .empty-note { background: var(--paper-2); color: var(--ink-mid); }

/* --------------------------------------------------------------------------
   フォーム・ボタン
   -------------------------------------------------------------------------- */

.input {
    width: 100%;
    padding: 10px 17px;
    border: none;
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.93rem;
    clip-path: var(--cut-sm);
}
.input:focus { outline: none; background: #fff; }
.input::placeholder { color: #9c8f84; }
textarea.input { padding: 12px 17px; line-height: 1.8; }

.button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 22px;
    border: none;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-display); font-weight: 900;
    font-size: 0.9rem;
    white-space: nowrap;
    clip-path: var(--cut-sm);
    transition: transform 0.13s ease, filter 0.13s ease, background 0.13s ease;
    filter: drop-shadow(5px 5px 0 var(--ground-2));
}
.button:hover { background: #fff; color: var(--ink); transform: translate(-2px, -2px); filter: drop-shadow(8px 8px 0 var(--ground-2)); }
.button:active { transform: translate(2px, 2px); filter: drop-shadow(2px 2px 0 var(--ground-2)); }
.button-accent { background: var(--band); color: #fff; filter: drop-shadow(5px 5px 0 var(--band-ink)); }
.button-accent:hover { background: #d62258; color: #fff; filter: drop-shadow(8px 8px 0 var(--band-ink)); }
.button-quiet { background: var(--ground-3); color: var(--paper); filter: none; }
.button-quiet:hover { background: #46352f; color: #fff; filter: none; }

.form-box { max-width: 660px; margin: 24px 0; }
.form-box label { display: block; margin-bottom: 18px; font-family: var(--font-cut); font-size: 0.98rem; }
.form-box .input { margin-top: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 20px; }
.form-inline { display: flex; align-items: flex-end; gap: 12px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 0.93rem; margin-bottom: 8px !important; }

.spec-fieldset { border: 2px solid var(--ground-3); padding: 14px 18px 6px; margin: 0 0 16px; background: var(--ground-2); }
.spec-fieldset legend { font-family: var(--font-mono); font-size: 0.69rem; color: var(--ink); background: var(--gold); padding: 2px 11px; clip-path: var(--cut-tag); }

.error-message { color: #ff8fa8; font-weight: 700; }

.recommend-form { max-width: 720px; }
.recommend-result { margin-top: 42px; padding: 30px; background: var(--ground-2); clip-path: var(--cut); }
.result-lead { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; margin-bottom: 6px; }
.notes-list { color: #c0b2a4; font-size: 0.88rem; }
.result-card { max-width: 340px; }
.result-total { margin-top: 18px; font-family: var(--font-mono); font-size: 1.24rem; font-weight: 700; color: var(--gold-lt); }

/* --------------------------------------------------------------------------
   管理画面（作業台）— 明るい地。長時間の作業に暗地は向かない
   -------------------------------------------------------------------------- */

body.admin-body { background: var(--paper); color: var(--ink); }
.admin-body a { color: var(--band-ink); }
.admin-body a:hover { color: var(--band); }
.admin-body .input { background: #fff; }
.admin-body .badge { background: var(--paper-2); color: var(--ink); }
.admin-body .empty-note { background: var(--paper-2); color: var(--ink-mid); }
.admin-body .page-header h1 { color: var(--ink); }
.admin-body .page-summary { color: var(--ink-mid); }

/* --------------------------------------------------------------------------
   レスポンシブ
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
    .hero-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .hero-band { position: static; left: 0; right: 0; margin: 0; }
    .mosaic { grid-auto-rows: 58px; }
}

/* 1080pxのwrapに収める: タグラインを先に落とし、さらに狭ければ文字のブランド名も落とす
   （ロゴ自体がワードマークなので消しても識別はできる） */
@media (max-width: 1400px) { .brand-tagline { display: none; } }
@media (max-width: 1120px) { .brand-name { display: none; } }

@media (max-width: 1100px) {
    .hero-art { min-height: 240px; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        order: 3;
        width: 42px;
        height: 42px;
        border: none;
        background: var(--gold);
        color: var(--ink);
        font-size: 1.1rem;
        cursor: pointer;
        clip-path: var(--cut-sm);
    }
    /* メニューは、ヘッダーの下の段に全幅で開く */
    .header-inner { flex-wrap: wrap; }
    .site-nav {
        display: none;
        order: 4;
        flex-basis: 100%;
        gap: 10px 12px;
        padding: 12px 0 4px;
        border-top: 2px solid var(--ground-3);
    }
    /* 2列以上に並べて、一画面で見渡せるようにする。入りきらない時は、メニューの中を上下に動かせる */
    .site-nav.open {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        align-items: start;
        max-height: calc(100vh - 150px);
        max-height: calc(100dvh - 150px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .nav-item > a { padding: 9px 10px; font-size: 1rem; white-space: normal; background: var(--ground-3); }
    .nav-children { position: static; opacity: 1; visibility: visible; background: transparent; padding: 2px 0 0; min-width: 0; clip-path: none; }
    .nav-children a { padding: 9px 10px; color: var(--paper); white-space: normal; line-height: 1.5; }
    .header-actions { order: 2; }
}

@media (max-width: 860px) {
    .header-inner { padding: 12px 18px; gap: 14px; }
    .main { padding: 26px 18px 68px; }
    .paper-sheet { padding: 30px 22px 38px; }
    .hero-stack { margin: 0 -18px; }
    .hero-body { padding: 30px 18px 10px; }
    .hero-band-inner { padding: 0 20px; }
    .mosaic { grid-template-columns: repeat(4, 1fr); }
    .row-scroll-wrap { margin: 0 -18px; }
    .row-scroll { padding: 8px 18px 18px; }
    .row-scroll-wrap::after { width: 30px; }
    .kanban { margin: 26px -18px 0; padding: 8px 18px 22px; grid-auto-columns: 84%; }
    .parts-toolbar { margin: 22px -18px 0; padding: 12px 18px; top: 54px; }
    .parts-toolbar .button { margin-left: 0; width: 100%; justify-content: center; }
    .footer-inner { padding: 28px 18px 34px; }
    .post-row { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
    .post-row-thumb { width: 64px; height: 64px; }
    .page-content { font-size: 1rem; }
}

@media (max-width: 360px) {
    .header-inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
    .header-inner .brand-logo { height: 36px; }
    .header-actions .button { padding-left: 12px; padding-right: 12px; }
}
