/* Products catalogue (app.html): a small "zukan" — numbered entries, a colour per app, a quick index. */
.dex-index { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.dex-index a { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .9rem .3rem .3rem; border: 1px solid var(--ink); border-radius: 999px; font-size: .875rem; font-weight: 600; transition: background .25s, transform .35s var(--spring); }
.dex-index a b { padding: .05rem .5rem; border-radius: 999px; background: var(--dex); font-family: var(--f-mono); font-size: .6875rem; font-weight: 700; }
.dex-index a[href="#no-03"] b { color: #fff5df; }
.dex-index a:hover { background: var(--dex); transform: translateY(-2px) rotate(-2deg); }

.catalogue-products { padding-top: 0; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.product-card { --dex: var(--acid); position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--ink); border-radius: var(--radius-lg); background: var(--surface); scroll-margin-top: calc(var(--header-h) + 1.5rem); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.product-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.product-card:target { box-shadow: 0 0 0 4px var(--acid); }
.product-card.featured, .product-card:not(.featured):last-child:nth-child(even) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.product-card:not(.featured):last-child:nth-child(even) .product-visual { height: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--ink); }
.product-card:not(.featured):last-child:nth-child(even) .product-info { justify-content: center; padding: clamp(1.5rem, 3vw, 2.5rem); }
.product-visual { position: relative; display: grid; place-items: center; height: 320px; overflow: hidden; border-bottom: 1px solid var(--ink); }
.product-card.featured .product-visual { height: auto; min-height: 420px; border-bottom: 0; border-right: 1px solid var(--ink); }
.product-visual::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgb(23 25 23 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(23 25 23 / .07) 1px, transparent 1px); background-size: 28px 28px; }
.product-visual img { position: relative; width: 140px; height: 140px; object-fit: contain; border-radius: 24%; box-shadow: 0 26px 40px -18px rgb(38 35 40 / .5); rotate: -8deg; transition: rotate .7s var(--spring), scale .7s var(--spring); }
.featured .product-visual img { width: 190px; height: 190px; }
.product-visual:hover img { rotate: 4deg; scale: 1.06; }
.visual-tag { position: absolute; top: 1rem; left: 1rem; padding: .05rem .5rem; border: 1px solid currentColor; border-radius: 3px; font-family: var(--f-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; }
.visual-caption { position: absolute; left: 1rem; bottom: 1rem; font-size: .875rem; font-weight: 700; }
.round-arrow { position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 1.2rem; transition: rotate .5s var(--spring), background .25s, color .25s; }
.product-visual:hover .round-arrow { rotate: 45deg; background: var(--acid); color: var(--ink); }
.shrine .round-arrow { background: #fff5df; color: var(--ink); }
.dex-no { position: absolute; top: .75rem; right: 1rem; font-family: var(--f-display); font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; color: rgb(23 25 23 / .16); pointer-events: none; transition: color .3s, transform .5s var(--spring); }
.shrine .dex-no { color: rgb(255 245 223 / .2); }
.product-visual:hover .dex-no { color: var(--ink); transform: rotate(-4deg); }
.shrine:hover .dex-no { color: #fff5df; }
.product-info { display: flex; flex: 1; flex-direction: column; padding: 1.4rem 1.4rem 1.5rem; }
.featured .product-info { justify-content: center; padding: clamp(1.5rem, 3vw, 2.75rem); }
.product-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.product-title h3 { font-family: var(--f-sig); font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.06em; }
.featured .product-title h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.product-title h3 a { background: linear-gradient(var(--dex), var(--dex)) 0 90% / 0 30% no-repeat; transition: background-size .5s var(--ease); }
.product-title h3 a:hover { background-size: 100% 30%; }
.product-title > span { padding: .05rem .5rem; border: 1px solid var(--ink); border-radius: 3px; background: var(--dex); font-family: var(--f-mono); font-size: .6875rem; font-weight: 700; }
#no-03 .product-title > span { color: #fff5df; }
.dex-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.dex-chips li { padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-family: var(--f-mono), 'Noto Sans JP', sans-serif; font-size: .6875rem; font-weight: 500; }
.product-info .dex-credit { margin: .8rem 0 0; font-size: .75rem; }
.dex-credit a { font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.product-info p { max-width: 34rem; margin: .8rem 0 1.1rem; color: var(--muted); font-size: .9375rem; line-height: 1.9; }
.product-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.product-links a { padding: .4rem .8rem; border: 1px solid var(--ink); border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 600; transition: background .2s, color .2s; }
.product-links a:first-child { background: var(--ink); color: var(--paper); }
.product-links a:hover { background: var(--acid); color: var(--ink); }
.is-fun .product-card:nth-child(odd) { rotate: -.5deg; }
.is-fun .product-card:nth-child(even) { rotate: .6deg; }
.is-fun .dex-no { color: var(--ink); }

@media (max-width: 860px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-card.featured, .product-card:not(.featured):last-child:nth-child(even) { grid-template-columns: 1fr; }
    .product-card.featured .product-visual, .product-card:not(.featured):last-child:nth-child(even) .product-visual { min-height: 320px; border-right: 0; border-bottom: 1px solid var(--ink); }
    .featured .product-visual img { width: 150px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
    .product-card:hover { transform: none; }
}
