/* IDATSUKA — 使う（store.html）専用。css/page.css の上に重ねる。
   一覧は js/rows.js の「選ぶ型」（.feat[data-pick]）のまま：いちばん新しいもの（または選んだもの）が
   .feat-main に入り、残りが .feat-row に並ぶ。要素は移されるだけなので、ここで「どこで何を見せるか」を決める。
     特集（.feat-main）… 画像 8・情報 4（番号・分類・名前・説明・価格・ボタン）
     一覧（.feat-row）  … 番号・16:9 の表紙・名前・分類・価格・「詳細 →」
   番号は表示順（特集が 01）。CSS カウンターで振る。 */

/* 絞り込み：件数は数字だけ小さく */
.store-filter .filter-btn span { margin-left: .3em; font-family: var(--f-serif); color: var(--c-sub); }
.store-filter .filter-btn[aria-pressed="true"] span { color: var(--c-accent); }
.store-filter-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 480px) { .store-filter .filter-btn { padding: 8px 0; } }

/* ── 番号 ── */
.feat { counter-reset: st; position: relative; }
.feat .st-item { counter-increment: st; }
.st-no::before { content: counter(st, decimal-leading-zero); }
.feat-shelf { display: none !important; }

.st-pic { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; }
.st-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-3) var(--ease-calm); }
.st-price { font-family: var(--f-serif); font-size: 20px; letter-spacing: .08em; color: var(--c-fg); }
.st-price span { font-family: var(--f-sans); font-size: 11.5px; letter-spacing: .06em; color: var(--c-sub); }
.st-desc code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .92em; }

/* ── 特集：画像 8・情報 4（スクリプトが無いときは、どれも特集の形で縦に並ぶ） ── */
.feat-main { margin-top: 40px; }
.feat-main > .st-item, .feat:not(.is-built) > .st-item {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; align-content: start;
  scroll-margin-top: 96px; }
.feat:not(.is-built) > .st-item { margin-top: 40px; }
.feat-main > .st-item > .st-pic, .feat:not(.is-built) > .st-item > .st-pic { grid-column: 1 / 9; grid-row: 1 / 3; }
.feat-main > .st-item > .st-no, .feat:not(.is-built) > .st-item > .st-no {
  grid-column: 9 / 13; grid-row: 1; display: block; border-top: 1px solid var(--c-fg); padding-top: 22px;
  font-family: var(--f-serif); font-weight: 300; font-size: 72px; line-height: 1; letter-spacing: .06em; color: var(--c-accent); }
.feat-main > .st-item > .st-info, .feat:not(.is-built) > .st-item > .st-info { grid-column: 9 / 13; grid-row: 2; min-width: 0; }
.feat-main .st-cat, .feat:not(.is-built) .st-cat { margin-top: 24px; font-family: var(--f-serif); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--c-sub); }
.feat-main .st-name, .feat:not(.is-built) .st-name { margin-top: 10px; font-family: var(--f-mincho); font-weight: 400; font-size: 26px; line-height: 1.55; letter-spacing: .08em; }
.feat-main .st-desc, .feat:not(.is-built) .st-desc { margin-top: 18px; font-size: 13px; line-height: 2; color: var(--c-sub); }
.feat-main .st-price, .feat:not(.is-built) .st-price { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.feat-main .st-actions, .feat:not(.is-built) .st-actions { margin-top: 22px; gap: 14px 28px; }
.feat-main .feat-more { display: none; }
.feat-main [tabindex="-1"]:focus { outline: none; }
.feat-main .st-item:hover .st-pic img { transform: scale(1.025); }
@media (max-width: 960px) {
  .feat-main > .st-item > .st-pic, .feat:not(.is-built) > .st-item > .st-pic { grid-column: 1 / 8; }
  .feat-main > .st-item > .st-no, .feat-main > .st-item > .st-info,
  .feat:not(.is-built) > .st-item > .st-no, .feat:not(.is-built) > .st-item > .st-info { grid-column: 8 / 13; }
}
@media (max-width: 760px) {
  .feat-main > .st-item > *, .feat:not(.is-built) > .st-item > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .feat-main > .st-item > .st-no, .feat:not(.is-built) > .st-item > .st-no { padding-bottom: 14px; font-size: 56px; }
  .feat-main .st-name, .feat:not(.is-built) .st-name { font-size: 23px; }
}

/* ── 番号付き一覧（選ぶと特集に入れ替わる） ── */
.feat-rowwrap { margin-top: 64px; }
.feat-rowwrap[hidden] { display: none; }
.feat-btn { display: none !important; }   /* 横に流さないので矢印は要らない */
.feat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 44px 24px; }
.feat-row > .st-item { display: block; min-width: 0; border-top: 1px solid var(--c-fg); padding-top: 12px; cursor: pointer; }
.feat-row .st-no { display: block; margin-bottom: 12px; font-family: var(--f-serif); font-size: 20px; letter-spacing: .1em; color: var(--c-accent); }
.feat-row .st-info { display: flex; flex-direction: column; }
.feat-row .st-desc, .feat-row .st-actions { display: none; }
.feat-row .st-name { order: -1; margin-top: 14px; font-family: var(--f-mincho); font-weight: 400; font-size: 15px; letter-spacing: .08em; line-height: 1.6;
  transition: color var(--d-1) var(--ease-calm); }
.feat-row .st-cat { margin-top: 4px; font-family: var(--f-serif); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--c-sub); }
.feat-row .st-price { margin-top: 6px; font-size: 15px; }
.feat-row .st-price span { display: none; }
.feat-row .feat-more { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .2em; color: var(--c-accent); }
.feat-row > .st-item:hover .st-name { color: var(--c-accent); }
.feat-row > .st-item:hover .st-pic img { transform: scale(1.025); }
.feat-row > .st-item:focus-visible { outline: 1px solid var(--c-accent); outline-offset: 6px; }
@media (max-width: 560px) { .feat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; } .feat-row .st-name { font-size: 14px; } }

/* ── 代行・オーダー（罫線の行） ── */
.st-services { margin-top: 88px; }
.st-services > [hidden] { display: none; }
.st-services .pg-rd p + p, .st-services .pg-rd p + div { margin-top: 12px; }
.st-services .pg-rd strong { font-weight: 400; color: var(--c-fg); }
.st-services .st-price { font-size: 18px; }

/* ── 応援 ── */
.st-support { padding-top: 28px; align-items: end; }
.st-support-text { grid-column: 1 / 8; font-size: 14.5px; line-height: 2.1; letter-spacing: .04em; }
.st-support .pg-links { grid-column: 9 / 13; }
@media (max-width: 760px) { .st-support-text, .st-support .pg-links { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  .st-pic img, .feat-row .st-name { transition: none; }
  .feat-main .st-item:hover .st-pic img, .feat-row > .st-item:hover .st-pic img { transform: none; }
}

/* 使う › ツール：絞り込み・検索・並べ替えつきのカード一覧（js/tools-list.js） */
.tl-box { margin-top: 32px; }
.tl-ctrl { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--c-line); }
.tl-cats button span { margin-left: 6px; font-size: 10.5px; color: var(--c-sub); letter-spacing: .04em; }
.tl-tools-r { display: flex; gap: 14px; align-items: center; flex: 1 1 320px; justify-content: flex-end; }
.tl-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tl-q { flex: 1 1 auto; max-width: 340px; }
.tl-q input, .tl-sort select { width: 100%; appearance: none; background: transparent; color: var(--c-fg); border: 0; border-bottom: 1px solid var(--c-line);
  padding: 8px 2px; font: inherit; font-size: 13px; letter-spacing: .04em; border-radius: 0; }
.tl-q input::placeholder { color: var(--c-sub); opacity: .8; }
.tl-q input:focus, .tl-sort select:focus { outline: none; border-bottom-color: var(--c-accent); }
.tl-sort select { padding-right: 18px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 7px) 55%, calc(100% - 3px) 55%; background-size: 4px 4px; background-repeat: no-repeat; }
.tl-sort select option { color: #111; }
.tl-count { margin-top: 14px; font-size: 11.5px; letter-spacing: .12em; color: var(--c-sub); }
.tl-list { margin-top: 18px; }
/* メイン：いちばん新しい1本を大きく */
.tl-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; padding-top: 24px; border-top: 1px solid var(--c-line); text-decoration: none; color: inherit; }
.tl-main-info { display: flex; flex-direction: column; }
.tl-main .tl-name { margin-top: 14px; font-size: 34px; }
.tl-main .tl-sub { font-size: 13px; }
.tl-desc { margin-top: 18px; font-size: 14px; line-height: 2; letter-spacing: .04em; }
.tl-main .tl-open { margin-top: 24px; }
.tl-main:hover .tl-name, .tl-main:focus-visible .tl-name { color: var(--c-accent); }
.tl-main:hover .tl-pic img { transform: scale(1.02); }
.tl-main:focus-visible { outline: 1px solid var(--c-accent); outline-offset: 6px; }
/* 絵（リンクカードの画像） */
.tl-pic { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: color-mix(in srgb, var(--c-fg) 6%, transparent); }
.tl-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-3) var(--ease-calm); }
/* カード：横一列（5本）・すべて見る・絞り込みの結果 */
.tl-grid { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 20px; }
.tl-grid[hidden] { display: none; }
.tl-grid.tl-all { margin-top: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tl-rest { margin-top: 40px; }
.tl-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.tl-card .tl-pic { margin-bottom: 14px; }
.tl-no { display: flex; align-items: center; gap: 10px; font-family: var(--f-serif); font-size: 13px; letter-spacing: .14em; color: var(--c-accent); }
.tl-no em { font-style: normal; font-family: inherit; font-size: 10px; letter-spacing: .16em; padding: 1px 7px; border: 1px solid var(--c-accent); }
.tl-name { margin-top: 8px; font-family: var(--f-mincho); font-weight: 400; font-size: 18px; letter-spacing: .1em; line-height: 1.4; transition: color var(--d-1) var(--ease-calm); }
.tl-sub { margin-top: 2px; font-size: 11.5px; letter-spacing: .06em; color: var(--c-sub); }
.tl-sum { margin-top: 10px; font-size: 12.5px; line-height: 1.8; letter-spacing: .04em; color: var(--c-sub); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; }
.tl-tags i { font-style: normal; font-size: 10.5px; letter-spacing: .1em; color: var(--c-sub); }
.tl-tags i::before { content: "— "; color: var(--c-line); }
.tl-open { font-size: 11.5px; letter-spacing: .16em; color: var(--c-sub); transition: color var(--d-1) var(--ease-calm); }
.tl-card:hover .tl-name, .tl-card:focus-visible .tl-name { color: var(--c-accent); }
.tl-card:hover .tl-pic img { transform: scale(1.03); }
.tl-card:focus-visible { outline: 1px solid var(--c-accent); outline-offset: 6px; }
.tl-empty { margin-top: 28px; font-size: 13px; color: var(--c-sub); }
@media (max-width: 960px) {
  .tl-main { grid-template-columns: 1fr; gap: 20px; }
  .tl-main .tl-name { font-size: 28px; }
  /* 横一列はそのまま横に送る（指で横にスクロール） */
  .tl-grid.tl-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(160px, 44%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .tl-grid.tl-row > li { scroll-snap-align: start; }
  .tl-grid.tl-rest, .tl-grid.tl-all { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tl-tools-r { flex-basis: 100%; }
  .tl-q { max-width: none; }
  .tl-cats { gap: 6px 16px; }
  .tl-grid { margin-top: 36px; gap: 28px 14px; }
  .tl-grid.tl-rest, .tl-grid.tl-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-name { font-size: 16px; }
  .tl-sum { display: none; }
  .tl-desc { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .tl-pic img { transition: none; } .tl-main:hover .tl-pic img, .tl-card:hover .tl-pic img { transform: none; } }

/* テンプレート：メインの下は5本まで横一列（スマホは横に送る）、6本目からは「すべて見る」で開く（js/rows.js の data-row） */
.feat[data-row] .feat-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 20px; }
.feat[data-row] .feat-row:not(.is-open) > .is-more { display: none; }
.feat-moreall[hidden] { display: none; }
@media (max-width: 960px) {
  .feat[data-row] .feat-row:not(.is-open) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(160px, 44%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .feat[data-row] .feat-row:not(.is-open) > * { scroll-snap-align: start; }
  .feat[data-row] .feat-row.is-open { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .feat[data-row] .feat-row.is-open { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
