/* 掲示板：写真の掲示板に記事の貼り紙を重ねる */
.nb { position: relative; overflow: hidden; padding: 96px 0 40px; background: #d9b071; }
.nb-bg { /* 同じ写真をぼかして周りに敷く */
  position: absolute; inset: -40px; background: url("board-bg.jpg") center / cover no-repeat;
  filter: blur(22px) saturate(1.1) brightness(1.04); transform: scale(1.08);
}
.nb-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nb-board {
  position: relative; width: min(100%, 1536px); min-width: 900px; margin: 0 auto; aspect-ratio: 1536 / 1024;
  container-type: inline-size; box-shadow: 0 20px 50px rgba(60, 30, 5, .35);
}
.nb-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 看板：上に木の札を重ねて「掲示板」に */
.nb-sign {
  position: absolute; left: 36.2%; top: 13%; width: 28.4%; height: 12.2%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: .3cqw;
  background:
    repeating-linear-gradient(0deg, rgba(60, 30, 10, .16) 0 .12cqw, rgba(0, 0, 0, 0) .12cqw .55cqw),
    repeating-linear-gradient(0deg, rgba(255, 220, 160, .1) 0 .3cqw, rgba(0, 0, 0, 0) .3cqw 1.4cqw),
    radial-gradient(ellipse at 30% 40%, rgba(255, 220, 160, .35), rgba(0, 0, 0, 0) 60%),
    var(--nb-noise),
    linear-gradient(180deg, #b98a55, #9c6b3c 55%, #8a5a30);
  box-shadow: inset 0 0 0 .18cqw rgba(60, 30, 10, .55), inset 0 .3cqw .6cqw rgba(255, 230, 180, .25), inset 0 -.4cqw .8cqw rgba(50, 20, 5, .35), 0 .4cqw .9cqw rgba(40, 20, 5, .45);
  color: #3a1f0c; pointer-events: none;
}
.nb-sign::before, .nb-sign::after { /* 釘 */
  content: ""; position: absolute; top: 50%; width: .9cqw; height: .9cqw; margin-top: -.45cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9cfc0, #5a4a3c 70%); box-shadow: .1cqw .15cqw .2cqw rgba(0, 0, 0, .45);
}
.nb-sign::before { left: 1.2cqw; } .nb-sign::after { right: 1.2cqw; }
.nb-sign b { font-family: "Noto Serif JP", "Yu Mincho", serif; font-weight: 900; font-size: 4.4cqw; letter-spacing: .5em; margin-right: -.5em; line-height: 1.1;
  text-shadow: 0 .12cqw 0 rgba(255, 225, 170, .45), 0 -.08cqw 0 rgba(30, 10, 0, .5); }
.nb-sign .nb-en { font-family: "Rye", "Cormorant Garamond", serif; font-size: 1.3cqw; letter-spacing: .35em; margin-top: .2cqw;
  text-shadow: 0 .08cqw 0 rgba(255, 225, 170, .45); }

/* 貼り紙（古い紙の質感） */
.nb {
  --nb-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --nb-blot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .36 0 0 0 0 .12 1.6 0 0 0 -.7'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23b)'/%3E%3C/svg%3E");
}
.nb-paper {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35cqw;
  padding: 1cqw 1.1cqw; text-align: center; text-decoration: none; color: #3b2414; overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  background:
    radial-gradient(ellipse 75% 70% at 50% 48%, rgba(255, 248, 228, .55), rgba(255, 248, 228, 0) 70%),
    radial-gradient(ellipse 120% 110% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(140, 85, 30, .32) 100%),
    var(--nb-blot), var(--nb-noise),
    #efdcb2;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(180deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(180deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-composite: intersect;
  transition: transform .3s ease, filter .3s ease;
}
.nb-paper > * { mix-blend-mode: multiply; }
.nb-paper:hover, .nb-paper:focus-visible { transform: rotate(0deg) scale(1.035); filter: brightness(1.06) drop-shadow(0 .5cqw .8cqw rgba(50, 25, 5, .35)); outline: none; z-index: 2; }
.nb-k { font-family: "Rye", "Cormorant Garamond", serif; font-size: 2.9cqw; line-height: 1; letter-spacing: .03em; color: var(--ink); text-shadow: .05cqw .05cqw 0 rgba(0, 0, 0, .15); }
.nb-star { font-size: .8cqw; color: var(--ink); opacity: .75; letter-spacing: .2em; }
.nb-t { font-family: "Noto Serif JP", "Yu Mincho", serif; font-weight: 900; font-size: 1.45cqw; line-height: 1.45; color: #3b2414;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nb-s { font-family: "Noto Serif JP", "Yu Mincho", serif; font-weight: 600; font-size: .95cqw; line-height: 1.5; color: #5a3a20;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nb-d { font-family: "Rye", serif; font-size: .95cqw; letter-spacing: .08em; color: var(--ink); }
.nb-photo { display: block; width: 78%; aspect-ratio: 4 / 3; overflow: hidden; border: .2cqw solid rgba(60, 35, 15, .6); }
.nb-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.55) contrast(1.05); }
.nb-paper.ink-brown { --ink: #4a2a14; } .nb-paper.ink-red { --ink: #b3321e; } .nb-paper.ink-blue { --ink: #2a4f9a; }
.nb-paper.small .nb-k { font-size: 1.7cqw; } .nb-paper.small .nb-t { font-size: 1.25cqw; } .nb-paper.small .nb-s { font-size: .8cqw; }
.nb-paper.tiny { padding: .5cqw .3cqw; gap: .3cqw; }
.nb-paper.tiny .nb-k { font-size: 1.1cqw; } .nb-paper.tiny .nb-t { font-size: .85cqw; writing-mode: vertical-rl; letter-spacing: .1em; -webkit-line-clamp: unset; }

/* ホーム（/）はヴェネツィアだけ、掲示板（/?board）は掲示板だけ。記事カードの一覧は出さない */
html.only-hero .nb { display: none; }
html:not(.only-hero) .hero.it { display: none; }
html:not(.only-hero) #articles { display: none; }
@media (max-width: 700px) { .nb { padding-top: 150px; } }
/* スマホ・ログイン前：ヘッダーに「ログイン」「無料登録」が出て高くなるので、茶色のぼかしの部分を高くしてボタンが絵にかからないように */
@media (max-width: 700px) { html:not(.is-member):not(.in-app) .nb { padding-top: 250px; } }   /* アプリのときは使わない（ログインの確認が済むまでの一瞬、高くならないように） */
/* ただし「ログイン」「無料登録」をメニューの中に出したとき（member.js の auth-in-nav）は、ボタンの分はいらない */
@media (max-width: 700px) { html.auth-in-nav:not(.in-app) .nb { padding-top: 190px; } }
@media (max-width: 700px) { html:not(.only-hero):not(.in-app) body:has(.site-header .nav .nav-auth) .nb { padding-top: 190px; } }
/* スマホ・ログイン中：ヘッダーと、そのすぐ下の会員メニューの下から絵が始まるように（--msn-bottom は member.js が入れる） */
@media (max-width: 700px) { html.is-member:not(.in-app):not(.only-hero) .nb { padding-top: calc(var(--msn-bottom, 230px) + 10px); } }

/* 文字が重ならないように：タイトルは縮めない、説明は入るだけ */
.nb-paper > * { flex-shrink: 0; }
.nb-paper .nb-s { flex-shrink: 1; min-height: 0; }
.nb-k { font-size: 2.5cqw; }
.nb-t { font-size: 1.3cqw; line-height: 1.42; }
.nb-s { font-size: .88cqw; }
.nb-paper.short .nb-s { -webkit-line-clamp: 1; }
.nb-paper.short .nb-k { font-size: 2.2cqw; }
.nb-paper {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%), linear-gradient(180deg, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%), linear-gradient(180deg, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
}
/* 説明文は1行だけ。下の段は紙が低いのでタイトルだけ */
.nb-s { -webkit-line-clamp: 1; }
.nb-paper.short .nb-s { display: none; }

/* 看板：大きくイタリア語、小さく日本語 */
.nb-sign b.nb-it { font-family: "Rye", "Cormorant Garamond", serif; font-weight: 400; font-size: 5cqw; letter-spacing: .12em; margin-right: -.12em; line-height: 1.05; }
.nb-sign .nb-ja { font-family: "Noto Serif JP", "Yu Mincho", serif; font-weight: 900; font-size: 1.5cqw; letter-spacing: .6em; margin-right: -.6em; margin-top: .3cqw;
  text-shadow: 0 .08cqw 0 rgba(255, 225, 170, .45); }
.nb-sign b.nb-it { font-size: 4.1cqw; letter-spacing: .1em; margin-right: -.1em; }

/* ===== 斜めから見た写真に合わせる：紙と看板は四隅に合わせて JS がゆがめる ===== */
.nb-bg { background-image: url("board-bg2.jpg"); }
.nb-paper, .nb-sign { left: 0 !important; top: 0 !important; transform-origin: 0 0; }
.nb-paper:hover, .nb-paper:focus-visible { transform: none; }
.nb-paper { transition: filter .3s ease; }
.nb-paper:hover, .nb-paper:focus-visible { filter: brightness(1.08) drop-shadow(0 0 .8cqw rgba(255, 230, 160, .9)); }
.nb-sign { width: auto; height: auto; }
.nb-paper.tiny .nb-k { font-size: .95cqw; }
.nb-paper.tiny .nb-t { font-size: .8cqw; }
.nb-paper.tiny .nb-k { font-size: .72cqw; letter-spacing: 0; }

/* ===== 記事の貼り紙：アイキャッチ＋タイトル＋日付 ===== */
.nb-paper.with-pic { justify-content: flex-start; gap: .45cqw; padding-top: 1.2cqw; }
.nb-paper.with-pic .nb-k { font-size: 1.9cqw; }
.nb-paper .nb-photo.eyecatch {
  display: block; width: 82%; aspect-ratio: 16 / 10; padding: 0; border-radius: 0; flex-shrink: 0;
  border: .22cqw solid rgba(60, 35, 15, .55); box-shadow: 0 0 0 .12cqw rgba(255, 245, 225, .6);
  filter: saturate(.82) sepia(.14) contrast(1.03);   /* 記事の写真：元より少しだけ彩度を下げて、ほんのりレトロに */
}
.nb-paper .nb-photo.eyecatch img { filter: none; }
.nb-paper > .nb-photo.eyecatch { mix-blend-mode: normal; }   /* 紙の色に溶けこませない（写真の色をそのまま） */
.nb-paper .nb-photo.eyecatch > span { display: none; }
.nb-paper.with-pic .nb-t { font-size: 1.12cqw; line-height: 1.4; -webkit-line-clamp: 2; }
.nb-paper.with-pic .nb-d { font-size: .82cqw; }
.nb-paper.with-pic.short { gap: .35cqw; padding-top: .9cqw; }
.nb-paper.with-pic.short .nb-k { font-size: 1.6cqw; }
.nb-paper.with-pic.short .nb-photo.eyecatch { width: 70%; aspect-ratio: 16 / 9; }
.nb-paper.with-pic.short .nb-t { font-size: 1.02cqw; }
/* 掲示板の絵は、横スクロールなしで画面の幅いっぱいに全体を表示（文字は絵の大きさに合わせて縮む） */
.nb-scroll { overflow-x: visible !important; }
.nb-board { min-width: 0 !important; width: 100% !important; max-width: 1536px; }

/* 左下の石畳のカフェテーブルとコーヒーカップ。湯気がゆらゆら立ちのぼる */
.nb-cafe { position: absolute; left: 0; bottom: 0; width: 81%; pointer-events: none; z-index: 2; }   /* 手前のテーブル（写真）：左と下は掲示板のふちで切れる */
.nb-cafe-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 -.2cqw .6cqw rgba(50, 25, 5, .22)); }   /* 手前のテーブル：左と下は掲示板のふちで切れる */
.nb-cafe-svg { display: block; width: 100%; height: auto; filter: saturate(.95) sepia(.06) drop-shadow(0 -.15cqw .5cqw rgba(50, 25, 5, .3)); }
.nb-steam { position: absolute; left: 23.6%; bottom: 82%; width: 9%; height: auto; aspect-ratio: 60 / 100; transform: translateX(-50%); overflow: visible; }
.nb-steam path {
  fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 34 130; stroke-dashoffset: 0; opacity: 0;
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: nb-rise 3.6s linear infinite, nb-sway 2.4s ease-in-out infinite alternate;
}
.nb-steam .nb-w2 { stroke-width: 5.5; animation-delay: -1.2s, -.8s; animation-duration: 4.2s, 2.9s; }
.nb-steam .nb-w3 { stroke-width: 5.5; animation-delay: -2.4s, -1.6s; animation-duration: 3.9s, 2.6s; }
/* 湯気：カップの口から白い筋が上へのぼって、ふっと消える */
@keyframes nb-rise {
  0%   { stroke-dashoffset: 0;    opacity: 0; }
  15%  { opacity: .9; }
  70%  { opacity: .55; }
  100% { stroke-dashoffset: -150; opacity: 0; }
}
/* ゆらぎ：左右にゆらゆら */
@keyframes nb-sway {
  0%   { transform: skewX(-7deg) scaleX(.9); }
  100% { transform: skewX(7deg) scaleX(1.12); }
}
@media (prefers-reduced-motion: reduce) { .nb-steam path { animation: none; opacity: .4; } }