/* ATOMO Shelf と使い方のページ（2026-11-15）。色は style.css の役割の色を使う */

.topnav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.topnav a { color: var(--ink); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.topnav a:hover { background: var(--self-soft); }
.topnav a.make { background: var(--self); color: var(--self-ink); font-weight: 600; }
.topnav a[aria-current="page"] { color: var(--self); font-weight: 600; }

.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 4px 14px; }
.shelf-head h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: 0.01em; }
.shelf-head p { margin: 4px 0 0; color: var(--mute); font-size: 14px; }
.find { position: relative; flex: 0 1 280px; }
.find input { width: 100%; padding: 8px 14px 8px 34px; border-radius: 999px; border: 1px solid var(--glass-edge); background: var(--field); outline: none; }
.find input:focus { border-color: var(--self); }
.find::before { content: ""; position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border: 2px solid var(--mute); border-radius: 50%; }
.find::after { content: ""; position: absolute; left: 24px; top: 50%; width: 2px; height: 6px; margin-top: 2px; background: var(--mute); transform: rotate(-45deg); border-radius: 1px; }

/* ---- 一押し：大きなカード。2枚ずつ見え、横に流れる ---- */
.rail.today { grid-template-rows: auto; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; padding: 4px 4px 14px; }
.tcard { position: relative; overflow: hidden; isolation: isolate; scroll-snap-align: start; height: 380px; border-radius: 22px; color: #fff; cursor: pointer;
  box-shadow: 0 14px 34px rgba(10, 40, 60, 0.18); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tcard:hover { transform: translateY(-2px) scale(1.005); box-shadow: 0 20px 44px rgba(10, 40, 60, 0.24); }
.tcard:focus-visible { outline: 3px solid var(--self); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tcard, .tcard:hover { transition: none; transform: none; } }

/* 写真を敷く所。写真がなければアイコンをぼかして敷く */
.mosaic { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #24414d; }
.mosaic::before { content: ""; position: absolute; inset: -40px; background: var(--av) center / cover; filter: blur(34px) saturate(150%); transform: scale(1.15); }
.mosaic.on::before { display: none; }
.mosaic.on { display: grid; gap: 2px; }
.mosaic.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.n3 img:first-child { grid-row: span 2; }
.mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.n6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.mosaic.cover::before { display: none; }
.mosaic.cover img { position: absolute; inset: 0; object-position: left center; } /* 絵の題は左にある */
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.veil { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.05) 38%, rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0.7) 100%); }
.tcard .cap { position: absolute; left: 22px; right: 22px; top: 18px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.9; }
.tcard h2 { margin: 2px 0 4px; font-size: 28px; line-height: 1.2; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3); }
.tcard .cap p { margin: 0; font-size: 14px; opacity: 0.92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.tcard .tfoot { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  padding: 12px 16px; background: rgba(20, 24, 28, 0.35); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.tcard .tfoot img { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; display: block; background: rgba(255, 255, 255, 0.2); }
.tcard .tfoot b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .tfoot span { display: block; font-size: 12px; opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .tfoot .get { background: rgba(255, 255, 255, 0.92); color: #0b2b38; }
.today-wrap .nav { margin-top: -24px; }
/* 一押しの2枠（2026-11-15）。枠ごとに1枚ずつ見え、矢印で3枚を切り替える */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo .rail-wrap { min-width: 0; }
.rail.today.deck { grid-auto-columns: 100%; }

/* ---- 棚 ---- */
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 4px 8px; }
.row-head h2 { margin: 0; font-size: 20px; }
.row-head h2 span { margin-left: 8px; color: var(--mute); font-size: 13px; font-weight: 400; }
.row-head a, .row-head button { border: none; background: none; color: var(--link); font-size: 14px; padding: 0; white-space: nowrap; }

/* 横に流れる。カードは2段に積み、横の列で進む（棚の高さは本数で変わらない） */
.rail { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: minmax(300px, calc((100% - 32px) / 3));
  gap: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 4px 6px; margin: 0 -4px; }
.rail::-webkit-scrollbar { display: none; }
.rail.one { grid-template-rows: auto; }
.rail-wrap { position: relative; }
.rail-wrap .nav { position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 1px solid var(--glass-edge);
  background: var(--glass-strong); box-shadow: var(--glass-shadow); color: var(--ink); font-size: 18px; line-height: 1; z-index: 2; }
.rail-wrap .nav.prev { left: -12px; }
.rail-wrap .nav.next { right: -12px; }
.rail-wrap .nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .rail-wrap .nav { display: none; } }

.item { scroll-snap-align: start; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; border-radius: 0; }
.item:nth-child(2n) { border-bottom-color: transparent; }
.rail.one .item { border-bottom-color: transparent; }
.item img, .item i.ph { width: 64px; height: 64px; border-radius: 15px; object-fit: cover; background: var(--bubble); display: block; box-shadow: 0 1px 2px rgba(10, 40, 60, 0.12); }
.item .t { font-weight: 600; font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--mute); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .h { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item:hover .t { color: var(--self); }
.get { display: inline-block; border: none; border-radius: 999px; padding: 4px 16px; font-size: 13px; font-weight: 700;
  background: var(--self-soft); color: var(--self); white-space: nowrap; text-align: center; }
.get.big { padding: 8px 22px; font-size: 15px; background: var(--self); color: var(--self-ink); }
.get.alt { background: var(--field); color: var(--ink); font-weight: 600; }
.get.big.alt { box-shadow: inset 0 0 0 1px var(--line); }
.get:active { opacity: 0.6; transform: scale(0.97); }

/* 「すべて見る」と検索：格子に並べる */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 16px; }
.grid .item { border-bottom-color: var(--line) !important; }
.back { border: none; background: none; color: var(--link); padding: 0; font-size: 14px; margin: 18px 4px 0; }

/* 作る入口と相談：棚の邪魔をしないよう、箱もボタンも使わず字だけにする */
.cta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 44px 4px 0; padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.cta span { flex: 1 1 auto; }
.cta a { white-space: nowrap; }
.order { margin: 6px 4px 0; color: var(--mute); font-size: 12.5px; line-height: 1.7; }
.order a { white-space: nowrap; }

/* ---- くわしく ---- */
#detail { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--glass-edge); color: var(--ink);
  background: var(--glass-strong); overflow: auto; }
#detail::backdrop { background: rgba(5, 20, 30, 0.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#detail .in { padding: 26px; }
#detail .x { position: absolute; top: 12px; right: 14px; border: none; background: var(--field); width: 30px; height: 30px; border-radius: 50%; font-size: 16px; line-height: 1; }
#detail .head { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
#detail .head img, #detail .head i.ph { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; background: var(--bubble); display: block; }
#detail h2 { margin: 0; font-size: 22px; line-height: 1.3; }
#detail .by { color: var(--mute); font-size: 13px; margin: 2px 0 10px; }
#detail .by a { color: inherit; }
#detail .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
#detail .tags span { font-size: 12px; padding: 1px 10px; border-radius: 999px; background: var(--self-soft); color: var(--self); }
#detail .desc { white-space: pre-wrap; margin: 18px 0 0; font-size: 15px; }
#detail .acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#detail .make { margin: 22px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--field); font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- 紹介（一押しを押したとき） ---- */
#detail.story { width: min(760px, calc(100vw - 32px)); }
#detail.story .banner { position: relative; isolation: isolate; height: 300px; color: #fff; overflow: hidden; border-radius: 26px 26px 0 0; }
#detail.story .banner .cap { position: absolute; left: 26px; right: 60px; bottom: 20px; }
#detail.story .banner h2 { margin: 2px 0 0; font-size: 32px; line-height: 1.2; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
#detail.story .banner .veil { background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.65) 100%); }
#detail.story .x { z-index: 2; background: rgba(0, 0, 0, 0.4); color: #fff; }
#detail.story .head { grid-template-columns: 72px 1fr; }
#detail.story .head img { width: 72px; height: 72px; border-radius: 17px; }
#detail.story h3 { margin: 26px 0 10px; font-size: 17px; }
.join { padding: 16px; border-radius: 16px; background: var(--field); }
.join p { margin: 0 0 12px; font-size: 15px; }
.scene { columns: 2 240px; column-gap: 12px; }
.scene .empty { column-span: all; padding: 18px 12px; } /* 2列に割れないように（2026-11-15、文が割れていた） */
.pcard { display: block; break-inside: avoid; margin: 0 0 12px; padding: 12px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); color: var(--ink); }
.pcard:hover { border-color: var(--self); }
.pcard .who { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.pcard .who img, .pcard .who i { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bubble); }
.pcard .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .who span { margin-left: auto; color: var(--mute); font-size: 12px; white-space: nowrap; }
.pcard p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pcard .pic { display: block; width: 100%; margin-top: 8px; border-radius: 10px; max-height: 260px; object-fit: cover; background: var(--bubble); }

/* ---- 使い方 ---- */
.guide { max-width: 760px; margin: 0 auto; }
.guide h1 { font-size: 30px; margin: 18px 4px 6px; }
.guide .lead { margin: 0 4px 22px; color: var(--mute); }
.guide section { padding: 22px 26px; margin: 0 0 16px; }
.guide h2 { margin: 0 0 8px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.guide h2 i { font-style: normal; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--self); color: var(--self-ink); font-size: 14px; flex: none; }
.guide p, .guide li { font-size: 15px; }
.guide p { margin: 6px 0; }
.guide ul { margin: 6px 0; padding-left: 1.3em; }
.guide li { margin: 3px 0; }
.guide dl { margin: 6px 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.guide dt { font-weight: 600; }
.guide dd { margin: 0; }
.guide code { font-size: 13.5px; padding: 1px 6px; border-radius: 6px; background: var(--field); }
.guide .toc { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 4px 18px; }
.guide .toc a { font-size: 13px; padding: 3px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); color: var(--ink); }
.guide .end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 4px 0; }

@media (max-width: 720px) {
  .shelf-head h1, .guide h1 { font-size: 24px; }
  .find { flex-basis: 100%; }
  .rail.today { grid-auto-columns: 88%; }
  .duo { grid-template-columns: 1fr; }
  .rail.today.deck { grid-auto-columns: 100%; }
  .tcard { height: 340px; }
  .tcard h2 { font-size: 24px; }
  #detail.story .banner { height: 220px; }
  #detail.story .banner h2 { font-size: 24px; }
  .rail { grid-auto-columns: 86%; }
  .topnav a:not(.make) { padding: 5px 8px; }
  #detail .head { grid-template-columns: 80px 1fr; }
  #detail .head img, #detail .head i.ph { width: 80px; height: 80px; border-radius: 19px; }
  .guide section { padding: 18px; }
  .guide dl { grid-template-columns: 1fr; }
}
