/* 制作ライブラリ（/lab/viewer）の見た目。生成物（もとのファイルから写して作る。手で直さない） */
/* 土台: hidden の付いた部品は必ず隠す（display を指定した部品でも）。余白と絵のはみ出しをなくす */
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; }
img { max-width: 100%; }
/* 入り口 = 3 つの扉（素材 / お手本 / 作り方）を縦に並べたタイルの面。
   お手本を開くとカードの一覧、カードを開くとポップアップ。
   動きの見本は 1 枚ずつ「実際の動画の一場面」として見せる（人物の映像・スマホの 3D・カフェの映像は Lab の実物）。
   色と書体は今の Lab ビューアーのものをそのまま使う（暗い 1 テーマ）。 */
@property --lx { syntax: '<percentage>'; inherits: true; initial-value: 30%; }
:root {
  color-scheme: dark;
  --bg0: #070605; --bg1: #0f0d0c; --bg2: #151210; --bg3: #1c1916; --bg4: #25201c;
  --ln: rgba(255, 236, 214, 0.07); --ln2: rgba(255, 236, 214, 0.12); --ln3: rgba(255, 236, 214, 0.2);
  --tx: #f4ede4; --tx2: #c9bfb3; --tx3: #8f857b; --tx4: #625950;
  --acc: #ff8a00; --acc2: #ffa53d; --acc-soft: rgba(255, 138, 0, 0.12); --acc-ink: #140a00;
  --free: #8fdca0; --paid: #ffc46b; --studio: #36383c; --stage: #1a2233; --stage-2: #39415a;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-en: "Inter Tight", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-xs: 12px; --fs-s: 13px; --fs-m: 14px; --fs-l: 16px; --fs-xl: 20px; --fs-xxl: 28px;
  --r: 10px; --r-sm: 7px;
}
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg0); color: var(--tx); font: 400 var(--fs-m)/1.6 var(--font-jp); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc2); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[class*="im-"] { background-size: cover; background-position: center; background-repeat: no-repeat; }
.im-person { background-image: url(/lab/site/zukan/img/person.webp); }
.im-cafe { background-image: url(/lab/site/zukan/img/cafe.webp); }
.im-sky { background-image: url(/lab/site/zukan/img/sky.webp); }
.im-food { background-image: url(/lab/site/zukan/img/food.webp); }
.im-phone { background-image: url(/lab/site/zukan/img/phone.webp); }

/* ── 上の帯 ── */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg0) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ln); }
.brand { display: flex; align-items: center; gap: 9px; font: 600 var(--fs-m)/1 var(--font-en); color: var(--tx2); white-space: nowrap; }
.brand svg { width: 24px; height: 24px; flex: none; }
.brand b { font: 700 var(--fs-l)/1 var(--font-jp); color: var(--tx); margin-left: 4px; }
.search { flex: 1 1 260px; max-width: 560px; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 0 12px; height: 38px; background: var(--bg2); border: 1px solid var(--ln2); border-radius: 99px; }
.search:focus-within { border-color: var(--ln3); background: var(--bg3); }
.search svg { width: 16px; height: 16px; color: var(--tx3); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--tx); font: 400 var(--fs-m)/1 var(--font-jp); }
.search input::placeholder { color: var(--tx3); }
.top__r { margin-left: auto; display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--ln2); border-radius: 99px; font-size: var(--fs-s); color: var(--tx2); white-space: nowrap; }
.pill:hover { background: var(--bg3); color: var(--tx); }
a.pill { text-decoration: none; }
.top__r { flex-wrap: wrap; justify-content: flex-end; }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 16px; padding-block: 22px 56px; }

/* ── 入り口の見出し ── */
body[data-view="home"] .top .search { display: none; }
.hero { display: grid; gap: 10px; padding-block: 14px 22px; }
.hero h1 { font: 900 clamp(26px, 4.4vw, 42px)/1.25 var(--font-jp); letter-spacing: .02em; text-wrap: balance; }
.hero__s { color: var(--tx2); font-size: var(--fs-l); max-width: 44em; text-wrap: pretty; }
.search--big { flex: none; height: 52px; max-width: 680px; margin-top: 8px; padding: 0 18px; gap: 12px; }
.search--big svg { width: 19px; height: 19px; }
.search--big input { font-size: var(--fs-l); }
.hit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hit .link { font-size: var(--fs-s); color: var(--acc2); text-decoration-color: currentColor; }

/* ── 絞り込みの部品 ── */
.intents, .subs__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.intents__l, .subs__l { font-size: var(--fs-s); color: var(--tx3); margin-right: 4px; }
.chip { height: 32px; padding: 0 13px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--ln); font-size: var(--fs-s); color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { background: var(--bg3); color: var(--tx); }
.chip[aria-pressed="true"] { background: var(--acc-soft); border-color: transparent; color: var(--acc2); }
.chip .n, .seg .n { font: 500 11px/1 var(--font-mono); color: var(--tx3); font-variant-numeric: tabular-nums; }
.hit { font-size: var(--fs-s); color: var(--tx3); min-height: 1.6em; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg2); border: 1px solid var(--ln); border-radius: 99px; max-width: 100%; overflow-x: auto; }
.seg button { height: 30px; padding: 0 13px; border-radius: 99px; font-size: var(--fs-s); color: var(--tx3); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--tx); }
.seg button[aria-checked="true"] { background: var(--bg4); color: var(--tx); }

/* ── 扉（節）── */
.door { margin-top: 30px; }
.door__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.door__h h2 { font: 700 var(--fs-xl)/1.3 var(--font-jp); letter-spacing: 0.02em; }
.door__h p { font-size: var(--fs-s); color: var(--tx3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 8px; padding: 7px 7px 9px; text-align: left; border-radius: var(--r); background: var(--bg1); border: 1px solid var(--ln); min-width: 0;
  transition: background .18s, border-color .18s, opacity .25s; }
.tile:hover { background: var(--bg2); border-color: var(--ln2); }
.tile[data-dim] { opacity: .22; }
.tile__l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 0 3px; min-width: 0; }
.tile__n { font-weight: 700; font-size: var(--fs-m); white-space: nowrap; }
.tile__c { margin-left: auto; font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--tx3); font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tile__c.soon { font-family: var(--font-jp); color: var(--tx4); }
.tile__c svg { width: 12px; height: 12px; color: var(--paid); }
.tile[data-soon] .st > * { opacity: .5; filter: saturate(.45); }
a.tile { color: inherit; text-decoration: none; }
.tile:disabled { cursor: default; }
.tile:disabled:hover { background: var(--bg1); border-color: var(--ln); }
.tile:disabled .tile__n { color: var(--tx3); }
.tile:disabled .tile__d { color: var(--tx4); }

/* 作り方の扉: 工程ごとの行に、文字だけの札を並べる */
.stage { margin-top: 18px; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px 14px; align-items: start; }
.stage h3 { font: 700 var(--fs-m)/1.4 var(--font-jp); color: var(--tx2); padding-top: 10px; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tile--text { gap: 2px; padding: 9px 12px 10px; align-content: start; }
.tile--text .tile__n { white-space: normal; }
.tile__d { font-size: var(--fs-xs); line-height: 1.5; color: var(--tx3); }

/* タイルの絵（中身は cqw で描く）*/
.st { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--r-sm); background: var(--bg3); overflow: hidden; container-type: inline-size; display: grid; place-items: center; }
.a-img { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.a-img i:nth-child(2) { background: linear-gradient(200deg, #274036, #7fae7a); }
.a-img i:nth-child(4) { background: linear-gradient(180deg, #1f2c4d, #6f86c9); }
.a-img i:nth-child(6) { background: linear-gradient(140deg, #5a2c47, #e0a0a8); }
.a-film { position: absolute; inset: 0; display: grid; place-items: center; }
.a-film::after { content: ""; border-left: 9cqw solid rgba(255, 255, 255, .92); border-top: 5.5cqw solid transparent; border-bottom: 5.5cqw solid transparent; margin-left: 2cqw; filter: drop-shadow(0 .6cqw 1.6cqw rgba(0, 0, 0, .5)); }
.a-wave { display: flex; align-items: center; gap: .9cqw; height: 100%; }
.a-wave i { width: 1.7cqw; height: calc(var(--h) * 1%); background: var(--tx2); border-radius: 1cqw; }
.a-ov { position: absolute; inset: 0; }
.a-ov b { position: absolute; right: 6cqw; bottom: 9cqw; padding: .6cqw 3.2cqw; background: var(--acc); color: var(--acc-ink); font: 900 6cqw/1.5 var(--font-jp); }
.a-studio { position: absolute; inset: 0; background: var(--studio); display: grid; place-items: center; }
.a-studio i { height: 88%; aspect-ratio: 255 / 533; background-size: contain; }
.a-3d { perspective: 90cqw; }
.cube { position: relative; width: 26cqw; height: 26cqw; transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-38deg); }
.cube i { position: absolute; inset: 0; border: 1px solid rgba(255, 236, 214, .35); }
.cube i:nth-child(1) { transform: translateZ(13cqw); background: #b8aa9a; }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(13cqw); background: #5c534a; }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(13cqw); background: #8b7f72; }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(13cqw); background: #73685d; }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(13cqw); background: #e2d6c6; }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(13cqw); background: #3d362f; }
.a-marble { position: absolute; inset: -10%; filter: blur(2.4cqw) saturate(1.1);
  background: radial-gradient(circle at 25% 30%, #ff8a00 0, transparent 42%), radial-gradient(circle at 75% 65%, #7b3fe4 0, transparent 46%), radial-gradient(circle at 62% 18%, #e84a6f 0, transparent 40%), #1a1320; }
.a-ts { display: flex; gap: 3cqw; font: 900 17cqw/1 var(--font-jp); }
.a-ts span:nth-child(1) { color: #fff; text-shadow: .7cqw 0 #111, -.7cqw 0 #111, 0 .7cqw #111, 0 -.7cqw #111, .5cqw .5cqw #111, -.5cqw .5cqw #111, .5cqw -.5cqw #111, -.5cqw -.5cqw #111; }
.a-ts span:nth-child(2) { background: linear-gradient(180deg, #ffe27a, #ff7d06); -webkit-background-clip: text; background-clip: text; color: transparent; }
.a-ts span:nth-child(3) { color: transparent; -webkit-text-stroke: .4cqw var(--tx); }
.a-font { display: flex; align-items: baseline; gap: 4cqw; font-size: 15cqw; line-height: 1; color: var(--tx); }
.a-font span:nth-child(1) { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; }
.a-font span:nth-child(2) { font-weight: 900; }
.a-font span:nth-child(3) { font-family: var(--font-mono); font-size: 11cqw; color: var(--tx2); }
.a-shapes { display: flex; align-items: center; gap: 5cqw; }
.a-shapes i { width: 15cqw; height: 15cqw; border: .8cqw solid var(--tx2); }
.a-shapes i:nth-child(1) { border-radius: 50%; }
.a-shapes i:nth-child(2) { border: 0; background: var(--tx2); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.a-stamp { width: 26cqw; height: 26cqw; background: var(--tx2); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* お手本のタイル（動く）*/
.a-race { width: 100%; display: grid; gap: 4.4cqw; padding: 0 14cqw; }
.a-race i { position: relative; height: 6cqw; background: linear-gradient(var(--ln3), var(--ln3)) center / 100% 1px no-repeat; }
.a-race b { position: absolute; left: 0; top: 0; width: 6cqw; height: 6cqw; border-radius: 50%; background: var(--c); animation: race 2.8s var(--e) infinite; }
@keyframes race { 0% { transform: translateX(0); opacity: 0; } 10% { transform: translateX(0); opacity: 1; } 66%, 90% { transform: translateX(52cqw); opacity: 1; } 100% { transform: translateX(52cqw); opacity: 0; } }
.a-tm { display: flex; font: 900 12cqw/1.3 var(--font-jp); overflow: hidden; padding: 0 1cqw; }
.a-tm span { animation: rise 3.2s cubic-bezier(.38, 0, .1, 1.1) infinite; animation-delay: calc(var(--i) * 90ms); }
@keyframes rise { 0% { transform: translateY(80%); opacity: 0; } 18%, 78% { transform: none; opacity: 1; } 92%, 100% { transform: translateY(-40%); opacity: 0; } }
.a-tr, .a-tr i { position: absolute; inset: 0; }
.a-tr i { animation: wipe 4.2s cubic-bezier(.86, 0, .33, 1) infinite; }
@keyframes wipe { 0%, 14% { clip-path: inset(0 100% 0 0); } 44%, 62% { clip-path: inset(0 0 0 0); } 92%, 100% { clip-path: inset(0 0 0 100%); } }
.a-light { position: relative; width: 30cqw; height: 30cqw; animation: sweep 5s ease-in-out infinite alternate; }
.a-light i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at var(--lx) 30%, #fff3e0 0, #ffb35c 14%, #c05a14 42%, #2a1206 74%, #0c0705 100%); }
.a-light::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -14%; height: 16%; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(1.4cqw); transform: translateX(calc((50% - var(--lx)) * .5)); }
@keyframes sweep { from { --lx: 22%; } to { --lx: 78%; } }
.a-cam { perspective: 90cqw; }
.a-cam .cube { animation: orbit 11s linear infinite; }
@keyframes orbit { from { transform: rotateX(-22deg) rotateY(0deg); } to { transform: rotateX(-22deg) rotateY(360deg); } }
.vf { position: absolute; inset: 7cqw; pointer-events: none; }
.vf s { position: absolute; width: 6cqw; height: 6cqw; border: solid var(--tx3); border-width: 0; }
.vf s:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.vf s:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.vf s:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.vf s:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.a-lens { position: relative; width: 60cqw; height: 34cqw; }
.a-lens i { position: absolute; border-radius: 50%; }
.a-lens i:nth-child(1) { left: 4cqw; top: 2cqw; width: 22cqw; height: 22cqw; background: var(--tx3); animation: focusB 4.4s ease-in-out infinite alternate; }
.a-lens i:nth-child(2) { right: 4cqw; bottom: 0; width: 28cqw; height: 28cqw; background: var(--acc); animation: focusA 4.4s ease-in-out infinite alternate; }
@keyframes focusA { 0%, 30% { filter: blur(0); } 70%, 100% { filter: blur(2.2cqw); } }
@keyframes focusB { 0%, 30% { filter: blur(2.2cqw); } 70%, 100% { filter: blur(0); } }
.a-color, .a-color i { position: absolute; inset: 0; }
.a-color i { filter: grayscale(.85) contrast(.9); animation: grade 4.6s ease-in-out infinite alternate; }
.a-color b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; animation: gradeL 4.6s ease-in-out infinite alternate; }
@keyframes grade { from { clip-path: inset(0 0 0 28%); } to { clip-path: inset(0 0 0 72%); } }
@keyframes gradeL { from { left: 28%; } to { left: 72%; } }
.a-mat { display: flex; gap: 4cqw; }
.a-mat i { width: 19cqw; height: 19cqw; border-radius: 50%; }
.a-mat i:nth-child(1) { background: radial-gradient(circle at 35% 30%, #b9aea2, #6d645c 70%, #4a433d); }
.a-mat i:nth-child(2) { background: linear-gradient(180deg, #f5f5f5 0, #8d949c 44%, #22262b 50%, #7c858f 56%, #e6e9ec 100%); }
.a-mat i:nth-child(3) { background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .75) 0, rgba(255, 255, 255, .08) 22%, transparent 60%), rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .35); }
.a-full { position: absolute; inset: 0; }
.a-full + .vf s { border-color: #fff; }
.a-pal { display: flex; width: 74%; height: 46%; border-radius: 1.6cqw; overflow: hidden; }
.a-pal i { flex: 1; }
.a-pal i:nth-child(1) { flex: 2; background: #1f2a44; }
.a-pal i:nth-child(2) { background: #3f6c8a; }
.a-pal i:nth-child(3) { background: #e8dcc8; }
.a-pal i:nth-child(4) { background: #f2a541; }
.a-pal i:nth-child(5) { background: #d9480f; }
.a-mood { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.a-mood i:nth-child(1) { background: linear-gradient(180deg, #d9b98a, #8a5a34 70%, #3b2416); }
.a-mood i:nth-child(2) { background: linear-gradient(180deg, #0b1030, #3b2a8c 55%, #ff3fa4); }
.a-mood i:nth-child(3) { background: linear-gradient(180deg, #f3efe6 0 62%, #b8242b 62% 70%, #f3efe6 70%); }
.a-fx { position: absolute; inset: 0; display: grid; place-items: center; font: 800 22cqw/1 var(--font-en); color: var(--tx); text-shadow: 0 0 3cqw var(--acc), 0 0 8cqw var(--acc);
  background: repeating-linear-gradient(0deg, transparent 0 1.2cqw, rgba(255, 255, 255, .04) 1.2cqw 1.6cqw); }
.a-comp { position: absolute; inset: 0; }
.a-comp::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, .6) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, .6) calc(66.66% + .5px), transparent 0),
              linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, .6) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, .6) calc(66.66% + .5px), transparent 0); }
.a-bars { display: flex; align-items: flex-end; gap: 3cqw; height: 70%; }
.a-bars i { width: 8cqw; height: calc(var(--h) * 1%); background: var(--tx2); border-radius: .8cqw .8cqw 0 0; transform-origin: bottom; animation: grow 3.4s cubic-bezier(.38, 0, .1, 1.1) infinite; animation-delay: calc(var(--i) * 110ms); }
.a-bars i:last-child { background: var(--acc); }
@keyframes grow { 0% { transform: scaleY(0); opacity: 1; } 28%, 84% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.a-work { display: flex; align-items: center; gap: 5cqw; width: 100%; padding: 0 9cqw; }
.a-work i { flex: none; width: 34cqw; aspect-ratio: 16 / 10; border-radius: 1.4cqw; }
.a-work span { flex: 1; display: grid; gap: 2.4cqw; }
.a-work span b { height: 1.8cqw; border-radius: 1cqw; background: var(--tx3); }
.a-work span b:nth-child(2) { width: 78%; } .a-work span b:nth-child(3) { width: 52%; }
.a-gen { display: flex; align-items: center; gap: 4cqw; width: 100%; padding: 0 8cqw; }
.a-gen span { flex: 1; display: grid; gap: 2.4cqw; }
.a-gen span b { height: 1.8cqw; border-radius: 1cqw; background: var(--tx3); }
.a-gen span b:nth-child(1) { width: 30%; background: var(--acc); }
.a-gen span b:nth-child(3) { width: 70%; }
.a-gen em { flex: none; position: relative; width: 36cqw; aspect-ratio: 16 / 10; border-radius: 1.4cqw; overflow: hidden; background: var(--bg4); display: grid; place-items: center; }
.a-gen em .a-img { gap: .8cqw; }
.a-gen em .a-wave { gap: .8cqw; }
.a-gen em .cube { scale: .5; }
.a-av { position: relative; width: 20cqw; height: 100%; }
.a-av::before { content: ""; position: absolute; left: 50%; top: 16%; width: 9cqw; height: 9cqw; margin-left: -4.5cqw; border-radius: 50%; background: var(--tx2); }
.a-av::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6cqw; height: 14cqw; border-radius: 50%; background: var(--tx2); }
.a-rec { display: flex; align-items: center; }
.a-rec i { width: 13cqw; height: 13cqw; border-radius: 3cqw; border: .7cqw solid var(--tx2); }
.a-rec i + i { margin-left: 8cqw; position: relative; }
.a-rec i + i::before { content: ""; position: absolute; right: 100%; top: 50%; width: 8cqw; height: .7cqw; margin-right: .7cqw; background: var(--tx3); }
.a-tpl { width: 58cqw; height: 40cqw; display: grid; grid-template: 7cqw 1fr / 1fr 1.6fr; gap: 2.4cqw; }
.a-tpl i { border: .6cqw solid var(--tx3); border-radius: 1.4cqw; }
.a-tpl i:first-child { grid-column: 1 / -1; }

/* ── 棚の中（モーション）── */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--tx3); }
.crumb button { color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ln3); }
.crumb button:hover { color: var(--tx); }
.cat__h { margin-top: 10px; display: grid; gap: 4px; }
.cat__h h1 { font: 700 var(--fs-xxl)/1.3 var(--font-jp); text-wrap: balance; }
.cat__h p { color: var(--tx2); max-width: 46em; }
.subs { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cards { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { position: relative; background: var(--bg1); border: 1px solid var(--ln); border-radius: var(--r); min-width: 0; transition: background .18s, border-color .18s; }
.card:hover { background: var(--bg2); border-color: var(--ln2); }
.card__open { display: grid; gap: 7px; align-content: start; width: 100%; padding: 7px 7px 11px; text-align: left; border-radius: var(--r); }
.fav { position: absolute; right: 13px; top: 13px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(7, 6, 5, .62); color: #fff; }
.fav:hover { background: rgba(7, 6, 5, .88); }
.fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav[aria-pressed="true"] { color: var(--paid); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.pop__hd .fav { position: static; grid-row: 1 / span 2; grid-column: 2; background: var(--bg3); color: var(--tx2); }
.pop__hd .fav:hover { background: var(--bg4); }
.pop__hd .fav[aria-pressed="true"] { color: var(--paid); }
.empty { grid-column: 1 / -1; padding: 28px 16px; text-align: center; color: var(--tx3); border: 1px dashed var(--ln2); border-radius: var(--r); }
.pill .n { font: 500 11px/1 var(--font-mono); color: var(--paid); font-variant-numeric: tabular-nums; }
.card__t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 0 3px; }
.card__t b { font-size: var(--fs-m); }
.spark { margin-left: auto; flex: none; width: 40px; height: 20px; fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card__t code { font: 500 var(--fs-xs)/1.4 var(--font-mono); color: var(--tx3); }
.card__t span { font-size: var(--fs-xs); color: var(--paid); }
.card p { padding: 0 3px; font-size: var(--fs-s); line-height: 1.5; color: var(--tx3); }

/* ── 動きの見本の舞台（16:9 の動画の一場面）── */
.demo { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-sm); background: #000; overflow: hidden; container-type: inline-size; }
.demo .bg, .demo .fg { position: absolute; inset: 0; }
.bg.dim::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.bg.studio { background: var(--studio); }
.bg.dark { background: radial-gradient(circle at 50% 40%, #1f1b18, #0b0908); }
.s-bar { position: absolute; right: 6cqw; bottom: 10cqw; display: grid; justify-items: start; }
.s-bar b { padding: .6cqw 3cqw; background: var(--acc); color: var(--acc-ink); font: 900 5.6cqw/1.5 var(--font-jp); }
.s-bar span { padding: .3cqw 3cqw; background: #fff; color: #111; font: 700 3cqw/1.6 var(--font-jp); }
.s-cap { position: absolute; left: 0; right: 0; bottom: 6cqw; text-align: center; white-space: nowrap; font: 900 6cqw/1.3 var(--font-jp); color: #fff;
  text-shadow: .45cqw 0 #000, -.45cqw 0 #000, 0 .45cqw #000, 0 -.45cqw #000, .32cqw .32cqw #000, -.32cqw .32cqw #000, .32cqw -.32cqw #000, -.32cqw -.32cqw #000; }
.s-cap span { display: inline-block; }
.s-bubble { position: absolute; left: 56cqw; top: 14cqw; padding: 2cqw 4cqw; border-radius: 4cqw 4cqw 4cqw .8cqw; background: #fff; color: #111; font: 900 5cqw/1.4 var(--font-jp); transform-origin: 0 100%; }
.s-panel { position: absolute; right: 5cqw; top: 10cqw; width: 36cqw; padding: 3cqw; border-radius: 2cqw; background: rgba(15, 13, 12, .88); display: grid; gap: 1.8cqw; color: #fff; }
.s-panel b { font: 700 3.6cqw/1.3 var(--font-jp); }
.s-panel i { height: 1.5cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .45); }
.s-panel i:nth-child(3) { width: 80%; } .s-panel i:nth-child(4) { width: 60%; }
.s-photo { position: absolute; right: 8cqw; top: 9cqw; width: 32cqw; aspect-ratio: 4 / 3; border: 1cqw solid #fff; border-radius: .8cqw; box-shadow: 0 1.5cqw 4cqw rgba(0, 0, 0, .35); rotate: 3deg; }
.s-rec { position: absolute; left: 4cqw; top: 4cqw; display: flex; align-items: center; gap: 1.4cqw; font: 700 3.4cqw/1 var(--font-en); letter-spacing: .08em; color: #fff; text-shadow: 0 0 1cqw rgba(0, 0, 0, .6); }
.s-rec i { width: 3cqw; height: 3cqw; border-radius: 50%; background: #ff3b30; }
.s-banner { position: absolute; left: 50%; top: 5cqw; width: 56cqw; margin-left: -28cqw; padding: 2.2cqw 3cqw; border-radius: 3cqw; background: rgba(245, 245, 245, .95); color: #111; display: flex; align-items: center; gap: 2.4cqw; }
.s-banner em { flex: none; width: 8cqw; height: 8cqw; background-size: contain; }
.s-banner b { display: block; font: 700 3.2cqw/1.4 var(--font-jp); }
.s-banner small { display: block; font: 400 2.8cqw/1.4 var(--font-jp); color: #444; }
.s-title { position: absolute; inset: 0; display: grid; place-items: center; white-space: nowrap; font: 900 8.4cqw/1.2 var(--font-jp); color: #fff; text-shadow: 0 .6cqw 2.4cqw rgba(0, 0, 0, .6); }
.s-head { position: absolute; left: 50%; top: 50%; width: 30cqw; height: 16cqw; margin: -8cqw 0 0 -15cqw; display: grid; place-items: center; background: #fff; color: #111; font: 900 9cqw/1 var(--font-jp); }
.s-cta { position: absolute; left: 50%; top: 50%; width: 42cqw; height: 11cqw; margin: -5.5cqw 0 0 -21cqw; border-radius: 6cqw; display: grid; place-items: center; overflow: hidden; background: #e62117; color: #fff; font: 900 4.6cqw/1 var(--font-jp); }
.s-cta i { position: absolute; top: 0; bottom: 0; left: -30%; width: 26%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); }
.s-stamp { position: absolute; left: 50%; top: 50%; width: 22cqw; height: 22cqw; margin: -11cqw 0 0 -11cqw; border-radius: 50%; border: 1cqw solid #fff; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font: 800 7.4cqw/1 var(--font-en); rotate: -8deg; }
.s-mark { position: absolute; inset: 0; display: grid; place-items: center; font: 900 9cqw/1 var(--font-jp); color: var(--tx); }
.s-mark > * { grid-area: 1 / 1; }
.s-mark i { width: 50cqw; height: 5cqw; margin-top: 6cqw; background: var(--acc); }
.s-mark span { position: relative; }
.s-phone { position: absolute; left: 50%; top: 50%; width: 22cqw; aspect-ratio: 255 / 533; margin: -23cqw 0 0 -11cqw; background-size: contain; filter: drop-shadow(0 2cqw 3cqw rgba(0, 0, 0, .35)); }
.s-phone--near { top: 60%; width: 17cqw; margin: -17.8cqw 0 0 18cqw; left: 50%; }
.s-phone--right { left: 76%; }
.s-title span { display: inline-block; }
.s-icon--sat { width: 9cqw; margin: -4.6cqw 0 0 -4.5cqw; }
.s-cubew { position: absolute; inset: 0; perspective: 140cqw; }
.s-cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.s-cube i { position: absolute; inset: 0; backface-visibility: hidden; }
.s-cube i:nth-child(1) { transform: translateZ(50cqw); }
.s-cube i:nth-child(2) { transform: rotateY(90deg) translateZ(50cqw); }
.s-band { position: absolute; top: 0; bottom: 0; left: 0; width: 40cqw; background: var(--acc); }
.s-icon { position: absolute; left: 50%; top: 50%; width: 20cqw; aspect-ratio: 374 / 384; margin: -10.3cqw 0 0 -10cqw; background-size: contain; filter: drop-shadow(0 2cqw 3cqw rgba(0, 0, 0, .3)); }
.s-icon--floor { top: auto; bottom: 10cqw; margin-top: 0; transform-origin: 50% 100%; }
.s-floor { position: absolute; left: 18cqw; right: 18cqw; bottom: 10cqw; height: 1px; background: var(--ln3); }
.s-heart { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3cqw; font: 700 6cqw/1 var(--font-en); font-variant-numeric: tabular-nums; color: var(--tx); }
.s-heart svg { width: 14cqw; height: 14cqw; fill: none; stroke: #ff4d6d; stroke-width: 2; stroke-linejoin: round; }
.s-count { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1cqw; }
.s-count small { font: 500 3.4cqw/1.4 var(--font-jp); color: var(--tx3); }
.s-count b { font: 800 15cqw/1 var(--font-en); font-variant-numeric: tabular-nums; color: var(--tx); }
.s-prog { position: absolute; left: 14cqw; right: 14cqw; top: 50%; margin-top: -6cqw; display: grid; gap: 2.4cqw; }
.s-prog small { font: 500 3.6cqw/1.4 var(--font-jp); color: var(--tx2); font-variant-numeric: tabular-nums; }
.s-prog div { height: 3cqw; border-radius: 2cqw; background: var(--bg4); overflow: hidden; }
.s-prog i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; }
.s-pan { position: absolute; inset: 0; width: 200%; display: flex; }
.s-pan i { flex: 1; }
.s-kb { position: absolute; inset: 0; }
.s-chart { position: absolute; left: 16cqw; right: 16cqw; top: 10cqw; bottom: 9cqw; display: flex; align-items: flex-end; gap: 4cqw; border-bottom: 1px solid var(--ln3); }
.s-chart i { flex: 1; height: calc(var(--h) * 1%); background: var(--tx2); border-radius: 1cqw 1cqw 0 0; transform-origin: 50% 100%; }
.s-chart i:last-child { background: var(--acc); }
.s-dots { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 5cqw); gap: 3.4cqw; place-content: center; }
.s-dots i { width: 5cqw; height: 5cqw; border-radius: 1.2cqw; background: var(--tx2); }
.s-list { position: absolute; left: 50%; top: 6cqw; bottom: -4cqw; width: 34cqw; margin-left: -17cqw; border: 1cqw solid #121214; border-radius: 4.4cqw 4.4cqw 0 0; background: #0e0e10; overflow: hidden; }
.s-list div { display: grid; gap: 1.6cqw; padding: 2.4cqw; }
.s-list i { height: 8cqw; border-radius: 1.6cqw; background: #2a2a2e; }
.s-list i:nth-child(3n + 1) { background: linear-gradient(120deg, #5a5a9b, #9a6fc0); height: 13cqw; }
.s-ring { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 3cqw; font: 500 3.4cqw/1 var(--font-jp); color: var(--tx3); }
.s-ring i { width: 12cqw; height: 12cqw; border-radius: 50%; border: 1.6cqw solid var(--bg4); border-top-color: var(--acc); }
.s-bell { position: absolute; left: 50%; top: 50%; width: 18cqw; height: 18cqw; margin: -9cqw 0 0 -9cqw; color: var(--tx); transform-origin: 50% 10%; }
.s-bell svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.s-tag { position: absolute; left: 50%; top: 0; width: 1px; height: 18cqw; background: var(--tx3); transform-origin: 50% 0; }
.s-tag b { position: absolute; left: -11cqw; top: 100%; width: 22cqw; padding: 1.6cqw 0; text-align: center; border-radius: 1.4cqw; background: #e62117; color: #fff; font: 800 6cqw/1.2 var(--font-en); }
.s-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.s-line path { fill: none; stroke: var(--acc); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; }
.s-line text { font: 700 4px var(--font-jp); fill: var(--tx2); }
.s-circle { position: absolute; inset: 0; display: grid; place-items: center; font: 900 8cqw/1 var(--font-jp); color: var(--tx); }
.s-circle > * { grid-area: 1 / 1; }
.s-circle svg { width: 56cqw; height: 20cqw; overflow: visible; }
.s-circle ellipse { fill: none; stroke: var(--acc); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; }

.s-laptop { position: absolute; left: 50%; top: 50%; width: 50cqw; aspect-ratio: 526 / 400; margin: -19cqw 0 0 -25cqw; background-size: contain; filter: drop-shadow(0 2cqw 3cqw rgba(0, 0, 0, .35)); }
.s-screen { position: absolute; inset: 0; background: #0b1426; opacity: 0; }
.s-screen i, .s-screen b { position: absolute; border-radius: .6cqw; }
.s-screen i:nth-child(1) { left: 4%; top: 6%; width: 45%; height: 46%; background: #5b8fd6; }
.s-screen i:nth-child(2) { left: 4%; top: 57%; width: 42%; height: 30%; background: #5cc067; }
.s-screen b { left: 56%; height: 6%; background: #6c7686; }
.s-screen b:nth-child(3) { top: 12%; width: 38%; }
.s-screen b:nth-child(4) { top: 25%; width: 38%; }
.s-screen b:nth-child(5) { top: 38%; width: 29%; }
.s-rip { position: absolute; left: 50%; top: 50%; width: 8cqw; height: 8cqw; margin: -4cqw 0 0 -4cqw; border-radius: 50%; border: .6cqw solid #fff; opacity: 0; }
.s-cur { position: absolute; left: 50%; top: 50%; width: 5cqw; height: 5cqw; margin: -2.5cqw 0 0 -2.5cqw; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 .6cqw rgba(0, 0, 0, .35); }
.s-tgl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5cqw; font: 700 4.4cqw/1 var(--font-jp); color: var(--tx); }
.s-tgl__t { position: relative; width: 18cqw; height: 10cqw; border-radius: 5cqw; background: var(--bg4); }
.s-tgl__t i { position: absolute; left: 1cqw; top: 1cqw; width: 8cqw; height: 8cqw; border-radius: 50%; background: #fff; }
.s-tabs { position: absolute; left: 14cqw; right: 14cqw; top: 50%; margin-top: -5cqw; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font: 700 4.2cqw/8cqw var(--font-jp); color: var(--tx2); border-bottom: 1px solid var(--ln3); }
.s-tabs b { position: absolute; left: 0; bottom: -1px; width: 33.333%; height: .8cqw; border-radius: 1cqw; background: var(--acc); }
.s-app { position: absolute; left: 50%; top: 6cqw; bottom: -4cqw; width: 34cqw; margin-left: -17cqw; border: 1cqw solid #121214; border-radius: 4.4cqw 4.4cqw 0 0; background: #0e0e10; overflow: hidden; }
.s-app > div { position: absolute; inset: 0; padding: 2.4cqw; display: grid; gap: 1.6cqw; align-content: start; }
.s-app i { height: 7cqw; border-radius: 1.6cqw; background: #2a2a2e; }
.s-app__a i:first-child { height: 13cqw; background: linear-gradient(120deg, #5a5a9b, #9a6fc0); }
.s-app__b { background: #1c1c24; }
.s-app__b i { background: #3a3a46; }
.s-app__b i:first-child { height: 13cqw; background: linear-gradient(120deg, #c05a14, #ffb35c); }
.s-pie { position: absolute; left: 50%; top: 50%; width: 30cqw; height: 30cqw; margin: -15cqw 0 0 -28cqw; border-radius: 50%; }
.s-pie__n { position: absolute; left: 57%; top: 50%; margin-top: -6cqw; font: 800 12cqw/1 var(--font-en); font-variant-numeric: tabular-nums; color: var(--tx); }
.s-phone--left { left: 30%; }
.s-callout { position: absolute; left: 65cqw; top: 9.5cqw; padding: 1cqw 2.4cqw; border-radius: 1.2cqw; background: #fff; color: #111; font: 700 3.2cqw/1.5 var(--font-jp); white-space: nowrap; }
.s-steps { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7cqw; font: 700 4cqw/1 var(--font-jp); color: var(--tx); }
.s-steps div { display: grid; justify-items: center; gap: 2cqw; }
.s-steps b { width: 11cqw; height: 11cqw; border-radius: 50%; display: grid; place-items: center; background: var(--tx); color: var(--bg0); font: 800 5.4cqw/1 var(--font-en); }

/* ── 見本は、決めた 1 色の背景と図形だけで見せる（上の指定をここで上書きする）── */
.bg.solid { background: var(--stage); }
.demo { --ui: linear-gradient(#5b8fd6, #5b8fd6) 8% 14% / 42% 46% no-repeat, linear-gradient(#5cc067, #5cc067) 8% 88% / 42% 26% no-repeat,
  linear-gradient(#6c7686, #6c7686) 90% 16% / 36% 6% no-repeat, linear-gradient(#6c7686, #6c7686) 90% 30% / 36% 6% no-repeat, linear-gradient(#6c7686, #6c7686) 72% 44% / 26% 6% no-repeat, #0b1426; }
/* 画面全体が主役の動き用の「場面」。写真の代わりに図形で組む */
.demo .im-person { background: radial-gradient(7cqw 7cqw at 30% 36%, #f4ede4 99%, transparent 100%), radial-gradient(14cqw 27cqw at 30% 100%, #f4ede4 99%, transparent 100%),
  linear-gradient(#f4ede4, #f4ede4) 82% 34% / 30cqw 3.4cqw no-repeat, linear-gradient(#7f8aa3, #7f8aa3) 82% 47% / 30cqw 2cqw no-repeat, linear-gradient(#7f8aa3, #7f8aa3) 72% 57% / 20cqw 2cqw no-repeat, #26314a; }
.demo .im-cafe { background: linear-gradient(#f4ede4, #f4ede4) 50% 30% / 44cqw 4cqw no-repeat, linear-gradient(#e0a070, #e0a070) 50% 46% / 30cqw 2.4cqw no-repeat, linear-gradient(#ff8a00, #ff8a00) 50% 72% / 18cqw 7cqw no-repeat, #4a2a1c; }
.demo .im-food { background: radial-gradient(9cqw 9cqw at 28% 50%, #f4ede4 99%, transparent 100%), radial-gradient(6cqw 6cqw at 52% 34%, #ffd27a 99%, transparent 100%), radial-gradient(7cqw 7cqw at 70% 64%, #ff8a00 99%, transparent 100%), #1f3b33; }
.demo .im-sky { background: radial-gradient(10cqw 5cqw at 24% 30%, #fff 99%, transparent 100%), radial-gradient(14cqw 6cqw at 70% 22%, #fff 99%, transparent 100%), radial-gradient(9cqw 4cqw at 56% 68%, #fff 99%, transparent 100%), #3b78c2; }
.s-bar { right: auto; left: 36cqw; bottom: auto; top: 20cqw; }
.s-cap { text-shadow: none; }
.s-bubble { left: 38cqw; top: 19cqw; }
.s-panel { right: auto; left: 32cqw; top: 14cqw; background: #f4ede4; color: #14161c; }
.s-panel i { background: rgba(20, 22, 28, .28); }
.s-photo { right: auto; left: 34cqw; top: 15cqw; background: radial-gradient(3cqw 3cqw at 74% 30%, #ffd27a 99%, transparent 100%), linear-gradient(165deg, transparent 58%, #3f8f5f 58.5%), #8fc1ff; }
.s-banner em { background: var(--acc); border-radius: 22%; }
.s-title { text-shadow: none; }
.s-icon { aspect-ratio: 1; margin: -10cqw 0 0 -10cqw; border-radius: 22%; background: var(--acc); filter: none; }
.s-icon::after { content: ""; position: absolute; inset: 30%; border: 1.6cqw solid #fff; border-radius: 18%; }
.s-icon--sat { width: 9cqw; margin: -4.5cqw 0 0 -4.5cqw; }
.s-icon--sat::after { border-width: .8cqw; }
.s-icon--floor { margin-top: 0; }
.s-list, .s-app { border-color: #444a59; }
.s-ring i { border-color: var(--stage-2); border-top-color: var(--acc); }
.s-prog div, .s-tgl__t { background: var(--stage-2); }
/* 動き用の簡単な立体: スマホは厚みのある板 */
.s-phone { width: 20cqw; aspect-ratio: 9 / 19; margin: -21.1cqw 0 0 -10cqw; background: none; filter: none; transform-style: preserve-3d; }
.s-phone > u, .s-phone > b, .s-phone::after { position: absolute; inset: 0; border-radius: 3.2cqw; }
.s-phone > u { background: #2c313d; }
.s-phone > u:nth-of-type(1) { transform: translateZ(-.45cqw); }
.s-phone > u:nth-of-type(2) { transform: translateZ(-.9cqw); }
.s-phone > u:nth-of-type(3) { transform: translateZ(-1.35cqw); }
.s-phone::after { content: ""; background: #444a59; transform: translateZ(-1.8cqw); }
.s-phone > i { position: absolute; background: #3a4050; }
.s-phone > i:nth-child(1) { left: 0; top: 3.2cqw; bottom: 3.2cqw; width: 1.8cqw; transform-origin: 0 50%; transform: rotateY(90deg); }
.s-phone > i:nth-child(2) { right: 0; top: 3.2cqw; bottom: 3.2cqw; width: 1.8cqw; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.s-phone > i:nth-child(3) { top: 0; left: 3.2cqw; right: 3.2cqw; height: 1.8cqw; transform-origin: 50% 0; transform: rotateX(-90deg); }
.s-phone > i:nth-child(4) { bottom: 0; left: 3.2cqw; right: 3.2cqw; height: 1.8cqw; transform-origin: 50% 100%; transform: rotateX(90deg); }
.s-phone > b { background: #0c0e13; box-shadow: inset 0 0 0 .5cqw #444a59; }
.s-phone > b::before { content: ""; position: absolute; inset: 1.1cqw; border-radius: 2.3cqw;
  background: linear-gradient(135deg, #7c6cf0, #c07cf5) 50% 12% / 82% 30% no-repeat, linear-gradient(#2a2f3b, #2a2f3b) 50% 52% / 82% 9% no-repeat,
    linear-gradient(#2a2f3b, #2a2f3b) 50% 65% / 82% 9% no-repeat, linear-gradient(#2a2f3b, #2a2f3b) 50% 78% / 82% 9% no-repeat, #12141b; }
.s-phone--near { width: 17cqw; margin: -17.9cqw 0 0 18cqw; }
/* ノート PC（平らな絵）。画面の中身は --ui で、全面の画面（.s-screen）と同じ */
.s-laptop { aspect-ratio: 2 / 1; margin: -12.5cqw 0 0 -25cqw; background: none; filter: none; }
.s-laptop::before { content: ""; position: absolute; left: 12%; top: 0; width: 76%; height: 86%; border-radius: 1.2cqw; box-shadow: 0 0 0 .7cqw #444a59; background: var(--ui); }
.s-laptop::after { content: ""; position: absolute; left: 0; right: 0; top: 88%; height: 12%; background: #8a90a0; clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%); }
.s-screen { background: var(--ui); }
/* ノート PC（立体）。土台は水平な板、ふたは奥の辺を軸に開く */
.s-l3 { position: absolute; inset: 0; transform-style: preserve-3d; }
.s-l3 > * { position: absolute; left: 50%; width: 44cqw; height: 30cqw; margin-left: -22cqw; }
.s-l3__base { top: 50%; margin-top: -15cqw; transform: rotateX(90deg); border-radius: 1.4cqw;
  background: linear-gradient(#5d6373, #5d6373) 50% 84% / 34% 22% no-repeat, repeating-linear-gradient(90deg, #3a3f4c 0 3cqw, #8a90a0 3cqw 3.5cqw) 50% 26% / 84% 44% no-repeat, #8a90a0; }
.s-l3__lid { top: calc(50% - 30cqw); transform-origin: 50% 100%; transform-style: preserve-3d; }
.s-l3__lid::before, .s-l3__lid::after { content: ""; position: absolute; inset: 0; border-radius: 1.4cqw; backface-visibility: hidden; }
.s-l3__lid::before { background: var(--ui); box-shadow: inset 0 0 0 .9cqw #2a2e38; }
.s-l3__lid::after { background: #8a90a0; transform: rotateY(180deg); }

/* 図形の部品。--x / --y は中心の位置、--w / --h は大きさ（どれも横幅を 100 とした単位。縦は 56.25 まで）*/
.k { position: absolute; left: calc(var(--x, 50) * 1cqw); top: calc(var(--y, 28.125) * 1cqw); width: calc(var(--w, 20) * 1cqw); height: calc(var(--h, 20) * 1cqw); margin: calc(var(--h, 20) * -.5cqw) 0 0 calc(var(--w, 20) * -.5cqw); }
.k-box { border-radius: calc(var(--r, 1.6) * 1cqw); background: var(--c, #f4ede4); }
.k-dot { border-radius: 50%; background: var(--c, #ff8a00); }
.k-ring { border-radius: 50%; border: calc(var(--b, 1) * 1cqw) solid var(--c, #f4ede4); }
.k-txt { display: grid; place-items: center; white-space: nowrap; font: 900 calc(var(--fs, 6) * 1cqw)/1.1 var(--font-jp); color: var(--c, #f4ede4); }
.k-clip { overflow: hidden; }
.k-3d { transform-style: preserve-3d; }
/* 厚みのある板（立体の被写体）。表の色は --c、側面の色は --c2、文字の色は --tc。丸にするには --r を大きくする */
.k-slab { transform-style: preserve-3d; }
.k-slab > u, .k-slab > b, .k-slab::after { position: absolute; inset: 0; border-radius: calc(var(--r, 1.6) * 1cqw); }
.k-slab > u { background: var(--c2, #8f8a80); }
.k-slab > u:nth-of-type(1) { transform: translateZ(-.5cqw); }
.k-slab > u:nth-of-type(2) { transform: translateZ(-1cqw); }
.k-slab > u:nth-of-type(3) { transform: translateZ(-1.5cqw); }
.k-slab::after { content: ""; background: var(--c2, #8f8a80); transform: translateZ(-2cqw); }
.k-slab > i { position: absolute; background: var(--c2, #8f8a80); }
.k-slab > i:nth-child(1) { left: 0; top: calc(var(--r, 1.6) * 1cqw); bottom: calc(var(--r, 1.6) * 1cqw); width: 2cqw; transform-origin: 0 50%; transform: rotateY(90deg); }
.k-slab > i:nth-child(2) { right: 0; top: calc(var(--r, 1.6) * 1cqw); bottom: calc(var(--r, 1.6) * 1cqw); width: 2cqw; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.k-slab > i:nth-child(3) { top: 0; left: calc(var(--r, 1.6) * 1cqw); right: calc(var(--r, 1.6) * 1cqw); height: 2cqw; transform-origin: 50% 0; transform: rotateX(-90deg); }
.k-slab > i:nth-child(4) { bottom: 0; left: calc(var(--r, 1.6) * 1cqw); right: calc(var(--r, 1.6) * 1cqw); height: 2cqw; transform-origin: 50% 100%; transform: rotateX(90deg); }
.k-slab > b { display: grid; place-items: center; overflow: hidden; background: var(--c, #f4ede4); color: var(--tc, #14161c); font: 900 calc(var(--fs, 5) * 1cqw)/1.1 var(--font-jp); white-space: nowrap; }
.gm { position: absolute; left: calc(50% + var(--gx) * 1cqw); bottom: 4cqw; width: 1px; height: 3cqw; background: var(--tx3); }

/* ── 棚の説明と、左の分類 ── */
.about { margin-top: 14px; border: 1px solid var(--ln); border-radius: var(--r); background: var(--bg1); }
.about summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: var(--fs-s); color: var(--tx2); }
.about__g { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; padding: 2px 14px 14px; }
.about h3 { font: 700 var(--fs-xs)/1.4 var(--font-jp); letter-spacing: .08em; color: var(--tx3); margin-bottom: 4px; }
.about p, .about li { font-size: var(--fs-s); color: var(--tx2); }
.about ul { margin: 0; padding-left: 1.1em; }
.about code { font: 500 var(--fs-xs)/1.4 var(--font-mono); color: var(--acc2); }
.shelf { margin-top: 18px; display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 22px; align-items: start; }
.shelf .cards { margin-top: 0; }
.shelf__main { display: grid; gap: 14px; min-width: 0; }
.clockbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 58px) + var(--bar-h, 50px) + 8px); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border: 1px solid var(--ln); border-radius: var(--r); background: color-mix(in srgb, var(--bg1) 92%, transparent); backdrop-filter: blur(8px); }
.clockbar .clock { margin-left: 0; }
.clockbar__track { flex: 1 1 160px; height: 24px; display: grid; align-items: center; cursor: pointer; }
.clockbar__track div { height: 4px; border-radius: 4px; background: var(--bg4); overflow: hidden; }
.clockbar__track i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); }
#names { display: grid; gap: 22px; }
.names h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font: 700 var(--fs-l)/1.4 var(--font-jp); }
.names h3 span { font: 500 var(--fs-xs)/1 var(--font-jp); color: var(--paid); }
.names__g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ncard { padding: 10px 12px; border: 1px dashed var(--ln2); border-radius: var(--r-sm); font-size: var(--fs-s); color: var(--tx2); }
.names__lead { padding-top: 14px; border-top: 1px solid var(--ln); font-size: var(--fs-s); color: var(--tx3); }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 58px) + var(--bar-h, 50px) + 12px); max-height: calc(100vh - var(--top-h, 58px) - var(--bar-h, 50px) - 28px); overflow-y: auto; display: grid; gap: 14px; padding-right: 4px; scrollbar-width: thin; }
.rail .seg { width: 100%; }
.rail .seg button { flex: 1; justify-content: center; padding: 0 6px; }
.rail .subs__row { display: grid; gap: 2px; }
.rail .subs__l { margin: 0; padding: 0 10px 2px; font-size: var(--fs-xs); letter-spacing: .06em; color: var(--tx4); }
.rail .chip { width: 100%; height: 34px; padding: 0 10px; justify-content: flex-start; background: none; border-color: transparent; border-radius: 8px; }
.rail .chip:hover { background: var(--bg2); }
.rail .chip[aria-pressed="true"] { background: var(--acc-soft); }
.rail .chip .n { margin-left: auto; }
.rail .chip em { font-style: normal; font-size: 11px; color: var(--tx4); }

/* ── ポップアップ ── */
dialog.pop { width: min(1080px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--ln2); border-radius: 14px; background: var(--bg1); color: var(--tx); overflow: auto; }
dialog.pop::backdrop { background: rgba(0, 0, 0, .7); }
.pop__in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.pop__l { position: relative; display: grid; align-content: center; gap: 12px; padding: 18px; background: var(--bg0); }
.pop__l .demo { border: 1px solid var(--ln); }
.pop__sit { font-size: var(--fs-s); color: var(--tx2); }
.pop__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 99px; background: var(--bg3); border: 1px solid var(--ln2); font-size: var(--fs-s); color: var(--tx); white-space: nowrap; }
.btn:hover { background: var(--bg4); }
.btn svg { width: 14px; height: 14px; }
.clock { margin-left: auto; font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--tx3); font-variant-numeric: tabular-nums; }
.pop__r { display: grid; align-content: start; gap: 16px; padding: 18px 18px 14px; min-width: 0; }
.pop__hd { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 8px; align-items: start; }
.pop__hd h2 { font: 700 var(--fs-xl)/1.35 var(--font-jp); }
.pop__hd code { font: 500 var(--fs-s)/1.4 var(--font-mono); color: var(--acc2); }
.pop__hd .x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--tx2); background: var(--bg3); grid-row: 1 / span 2; grid-column: 3; }
.pop__hd .x:hover { background: var(--bg4); color: var(--tx); }
.pop__hd .x svg { width: 16px; height: 16px; }
.pop__desc { color: var(--tx2); }
.sec { display: grid; gap: 7px; min-width: 0; }
.sec__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec h3 { font: 700 var(--fs-xs)/1.4 var(--font-jp); letter-spacing: .08em; color: var(--tx3); }
.link { font-size: var(--fs-xs); color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ln3); }
.link:hover { color: var(--tx); }
.graph { width: 100%; height: auto; display: block; background: var(--bg0); border: 1px solid var(--ln); border-radius: var(--r-sm); }
.graph .grid { stroke: var(--ln2); stroke-width: 1; fill: none; }
.graph .curve { stroke: var(--acc); stroke-width: 2.2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.graph .area { fill: var(--acc-soft); stroke: none; }
.graph text { font: 500 10px var(--font-mono); fill: var(--tx3); }
.graph .peak { fill: var(--tx2); }
.graph .ph { stroke: var(--tx3); stroke-width: 1; fill: none; }
.graph .dot { fill: var(--tx); stroke: none; }
.graph .pk { fill: var(--acc2); stroke: none; }
.params { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 14px; font-size: var(--fs-s); }
.params dt { color: var(--tx3); white-space: nowrap; }
.params dd { color: var(--tx); overflow-wrap: anywhere; }
pre.code { margin: 0; padding: 11px 12px; overflow-x: auto; background: var(--bg0); border: 1px solid var(--ln); border-radius: var(--r-sm); font: 400 var(--fs-xs)/1.65 var(--font-mono); color: var(--tx2); }
.say { padding: 10px 12px; background: var(--acc-soft); border-radius: var(--r-sm); color: var(--tx); }
.pop__nav { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--ln); background: var(--bg1); }

/* ── 分類のページの上の行・横から出るライブラリ ── */
.cat__bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 58px)); z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-inline: -16px; padding: 8px 16px; background: color-mix(in srgb, var(--bg0) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ln); }
.cat__bar #cat-name { font: 700 var(--fs-l)/1.2 var(--font-jp); }
.cat__h { margin-top: 14px; }
.cat__bar .seg { margin-left: auto; }
/* 広い画面: 余白を取らず画面いっぱいに使う。ライブラリを出すと、左に列ができて中身が右へ詰まる */
@media (min-width: 901px) {
  body[data-view="cat"] .wrap { max-width: none; }
  #cat { display: grid; grid-template-columns: 0px minmax(0, 1fr); transition: grid-template-columns .3s cubic-bezier(.2, .8, .2, 1); }
  body[data-lib="on"] #cat { grid-template-columns: 236px minmax(0, 1fr); }
  .dock { min-width: 0; overflow-x: clip; }
  .dock__in { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 58px) + 12px); width: 220px; max-height: calc(100vh - var(--top-h, 58px) - 28px); overflow-y: auto; scrollbar-width: thin; display: grid; align-content: start; gap: 2px; padding: 6px; border: 1px solid var(--ln); border-radius: var(--r); background: var(--bg1); transition: visibility 0s .3s; }
  body:not([data-lib="on"]) .dock__in { visibility: hidden; }
  body[data-lib="on"] .dock__in { transition: none; }
}
@media (max-width: 900px) { .dock { display: none; } }
.btn[aria-pressed="true"] { background: var(--acc-soft); border-color: transparent; color: var(--acc2); }
dialog.drawer { position: fixed; inset: 0 auto 0 0; margin: 0; width: min(304px, 88vw); height: 100%; max-height: 100%; padding: 0; border: 0; border-right: 1px solid var(--ln2); background: var(--bg1); color: var(--tx); overflow-y: auto; }
dialog.drawer::backdrop { background: rgba(0, 0, 0, .55); }
dialog.drawer[open] { animation: drawer-in .3s cubic-bezier(.2, .8, .2, 1); }
dialog.drawer.is-closing { animation: drawer-out .2s ease-in forwards; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@keyframes drawer-out { to { transform: translateX(-100%); } }
.drawer__in { min-height: 100%; display: grid; align-content: start; gap: 2px; padding: 10px 10px calc(18px + env(safe-area-inset-bottom, 0px)); }
.drawer__h { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px 10px; font-weight: 700; }
.drawer__h .x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--tx2); background: var(--bg3); }
.drawer__h .x svg { width: 16px; height: 16px; }
.drawer h3, .dock h3 { margin-top: 12px; padding: 0 10px 2px; font: 500 var(--fs-xs)/1.6 var(--font-jp); letter-spacing: .06em; color: var(--tx4); }
/* ライブラリのカード。アプリのライブラリと同じ 2 枚重ね（表と、少しのぞく裏）。寸法と動きはアプリの library-tiles.css の写し */
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2px; }
#lib-list .lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lrule { grid-column: 1 / -1; height: 1px; margin: 9px 4px; background: var(--ln); }
.ltile { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 7px 1px 7px; border-radius: 10px; text-align: center; color: var(--tx); }
.ltile:hover, .ltile:focus-visible { position: relative; z-index: 2; }
.ltile[aria-current] { background: var(--acc-soft); }
.ltile__art { position: relative; width: 52px; aspect-ratio: 1 / 1; }
.lplate { position: absolute; inset: 0; border-radius: 24%; overflow: hidden; background: linear-gradient(152deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(0, 0, 0, .16), 0 5px 12px -5px rgba(0, 0, 0, .42);
  transform-origin: 50% 50%; transition: transform .32s cubic-bezier(.32, .72, 0, 1), box-shadow .3s ease; }
.lplate::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(176deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, 0) 54%); }
.lplate svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lplate--back { z-index: 0; transform: translateX(6%) rotate(4deg) scale(.93); filter: brightness(.86) saturate(.92); }
.lplate--front { z-index: 1; }
.ltile:not(:disabled):hover .lplate--back, .ltile:not(:disabled):focus-visible .lplate--back { transform: translateX(18%) rotate(15deg) scale(.9); }
.ltile:not(:disabled):hover .lplate--front, .ltile:not(:disabled):focus-visible .lplate--front { transform: rotate(-11deg); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(0, 0, 0, .16), 0 10px 20px -7px rgba(0, 0, 0, .4); }
.ltile:not(:disabled):active .lplate--front { transform: rotate(-11deg) scale(.96); }
.ltile:disabled { cursor: default; }
.ltile:disabled .ltile__art { opacity: .38; filter: grayscale(.72); }
.ltile__l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.ltile[aria-current] .ltile__l { color: var(--acc2); }
.ltile:disabled .ltile__l { color: var(--tx4); }
@media (prefers-reduced-motion: reduce) { .lplate { transition-duration: .01ms; } }
.lib__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 8px; text-align: left; font-size: var(--fs-m); color: var(--tx2); }
.lib__row:hover { background: var(--bg2); color: var(--tx); }
.lib__row[aria-current] { background: var(--acc-soft); color: var(--acc2); }
.lib__row .n { font: 500 11px/1 var(--font-mono); color: var(--tx3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lib__row:disabled { cursor: default; color: var(--tx4); }
.lib__row:disabled:hover { background: none; color: var(--tx4); }
.lib__row:disabled .n { font-family: var(--font-jp); color: var(--tx4); }

/* ── 一覧の見出し（ジャンルごと）と、素材のカード ── */
.sect__h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin-top: 12px; padding: 0 2px; }
.sect__h:first-child { margin-top: 0; }
.sect__h b { font-size: var(--fs-l); }
.sect__h span { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--tx3); font-variant-numeric: tabular-nums; }
.sect__h .link { margin-left: auto; }
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.acard { position: relative; border: 1px solid var(--ln); border-radius: var(--r); background: var(--bg1); min-width: 0; transition: background .18s, border-color .18s; }
.acard__open { display: grid; gap: 4px; align-content: start; width: 100%; padding: 6px 6px 9px; text-align: left; border-radius: var(--r); min-width: 0; }
.acard .fav { right: 11px; top: 11px; width: 30px; height: 30px; }
.acard .fav svg { width: 15px; height: 15px; }
.aplay { position: absolute; left: 11px; top: 11px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #14161c; }
.aplay:hover { background: var(--acc2); }
.aplay svg { width: 14px; height: 14px; fill: currentColor; }
.aplay .i-pause, .aplay[aria-pressed="true"] .i-play { display: none; }
.aplay[aria-pressed="true"] .i-pause { display: block; }
.acard__m { padding: 0 3px; font-size: 11px; line-height: 1.5; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard__m b { font-weight: 500; color: var(--paid); }
.acard__th--bg { background-size: 170% 170%; animation: bgdrift 9s ease-in-out infinite alternate; }
@keyframes bgdrift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.tags { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tags span { padding: 2px 8px; border-radius: 99px; background: var(--bg3); font-size: 11px; line-height: 1.6; color: var(--tx2); }
.pop__l .aplay { position: static; width: 40px; height: 40px; }
.pop__l .aplay svg { width: 18px; height: 18px; }
#apop-th { position: relative; }
.livebox { position: absolute; z-index: 2; overflow: hidden; border: 1px solid var(--ln); border-radius: 8px; background: #000; }
.livebox iframe { display: block; width: 100%; height: 100%; border: 0; }
#apop-th .hi { position: absolute; inset: 0; border-radius: 8px; background-repeat: no-repeat; opacity: 0; transition: opacity .25s; }
#apop-th .hi[data-on] { opacity: 1; }
.acard:hover { background: var(--bg2); border-color: var(--ln2); }
.acard__th { aspect-ratio: 16 / 9; border-radius: 6px; background-color: var(--bg3); background-repeat: no-repeat; background-size: cover; overflow: hidden; display: grid; place-items: center; }
.acard__th--wave svg { width: 86%; height: 62%; fill: var(--tx2); }
.acard__th--txt { font: 700 26px/1 var(--font-jp); color: var(--tx2); }
.acard__t { display: flex; align-items: center; gap: 6px; padding: 0 3px; min-width: 0; }
.acard__t b { font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard__t svg { flex: none; width: 12px; height: 12px; color: var(--paid); }
.acard code { padding: 0 3px; font: 500 11px/1.4 var(--font-mono); color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acards__note { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--tx3); }
.pop__l .acard__th { border: 1px solid var(--ln); border-radius: 8px; }
.pop__l .acard__th--txt { font-size: 64px; }

/* ── ポップアップは決まった大きさ（中身が変わっても「次へ」の位置が動かない）。右の説明は中で送る ── */
@media (min-width: 761px) {
  dialog.pop { width: min(1440px, calc(100% - 48px)); height: min(900px, calc(100% - 48px)); max-height: none; overflow: hidden; }
  .pop__in { height: 100%; grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .pop__l { min-height: 0; container-type: size; }
  .pop__r { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  /* 絵は、左の面に収まるいちばん大きい 16:9 */
  #pop .pop__l .demo { width: min(100%, calc((100cqh - 96px) * 16 / 9)); margin-inline: auto; }
  .zoom { width: min(100%, calc((100cqh - 104px) * 16 / 9)); margin-inline: auto; }
  #apop[data-zoom] .pop__in { grid-template-columns: minmax(0, 1fr); }
  #apop[data-zoom] .pop__r { display: none; }
  #apop[data-zoom] .zoom { width: min(100%, calc((100cqh - 58px) * 16 / 9)); }
  #apop[data-zoom] .pop__l > .pop__sit { display: none; }
}
.zoom { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--ln); border-radius: 8px; cursor: zoom-in; touch-action: none; user-select: none; }
.zoom__in { position: absolute; inset: 0; transform-origin: 0 0; }
.zoom .acard__th { position: relative; width: 100%; height: 100%; border: 0; border-radius: 0; }
/* 構図の図 */
.comp { display: block; width: 100%; height: 100%; }
.cf { fill: var(--stage); }
.cl { fill: none; stroke: var(--acc); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.cl2 { fill: none; stroke: var(--tx3); stroke-width: .8; stroke-dasharray: 3 3; }
.cs, .cp { fill: #f4ede4; }
.cb { fill: #f4ede4; opacity: .9; }
.cd { fill: var(--stage-2); }
.cg { fill: var(--stage-2); opacity: .7; }
.ca { fill: var(--acc); }
/* 音: ジャケットと波形 */
.acard__th--au { grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding-right: 8px; place-items: center stretch; }
.au__c { height: 100%; aspect-ratio: 1 / 1; background-repeat: no-repeat; background-color: var(--bg4); }
.wave { display: block; width: 100%; height: 60%; fill: var(--tx2); }
.aplayer { display: grid; justify-items: center; gap: 16px; }
.aplayer__cover { position: relative; width: min(58%, 400px); }
.aplayer__cover .au__c { position: relative; width: 100%; height: auto; border-radius: 10px; overflow: hidden; border: 1px solid var(--ln); }
.aplayer__wave { position: relative; width: 100%; height: 76px; cursor: pointer; }
.aplayer__wave .wave { position: absolute; inset: 0; height: 100%; fill: var(--bg4); }
.aplayer__prog { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); pointer-events: none; }
.aplayer__prog .wave { fill: var(--acc); }
@media (min-width: 761px) { .aplayer__cover { width: min(58%, calc(100cqh - 250px)); } }

/* ── 右の欄: 素材 ID の箱・頼みたいことの札・ツマミ・説明・CLI・例 ── */
.idbox { display: grid; gap: 8px; padding: 12px; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); border-radius: var(--r); background: var(--acc-soft); }
.idbox__t { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); font-weight: 700; color: var(--acc2); }
.idbox__t small { font-weight: 400; color: var(--tx3); }
.idbox code { padding: 9px 11px; border-radius: var(--r-sm); background: var(--bg0); font: 500 var(--fs-m)/1.5 var(--font-mono); overflow-wrap: anywhere; }
.btn--main { justify-content: center; height: 38px; background: var(--acc); border-color: transparent; color: #14161c; font-weight: 700; }
.btn--main:hover { background: var(--acc2); }
.btn--wide { justify-content: center; width: 100%; height: 36px; }
.say { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; scrollbar-width: thin; }
pre.code { max-height: 300px; overflow: auto; scrollbar-width: thin; }
.kgs { display: grid; gap: 6px; }
.kg { border: 1px solid var(--ln); border-radius: var(--r-sm); background: var(--bg0); }
.kg summary { cursor: pointer; padding: 8px 10px; font-size: var(--fs-s); font-weight: 700; color: var(--tx2); display: flex; gap: 8px; }
.kg summary span { margin-left: auto; font: 500 11px/1.8 var(--font-mono); color: var(--tx3); }
.kg__b { display: grid; gap: 10px; padding: 4px 10px 12px; }
.kn { display: grid; gap: 4px; min-width: 0; }
.kn > label, .kn > span { font-size: var(--fs-xs); color: var(--tx2); }
.kn__c { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kn__c input[type="range"] { flex: 1; min-width: 0; accent-color: var(--acc); }
.kn__c input[type="number"], .kn__c input[type="text"], .kn__c select { height: 30px; padding: 0 8px; border: 1px solid var(--ln2); border-radius: 6px; background: var(--bg2); color: var(--tx); font: 500 var(--fs-xs)/1 var(--font-mono); min-width: 0; }
.kn__c input[type="number"] { width: 78px; }
.kn__c input[type="text"], .kn__c select { flex: 1; }
.kn__c input[type="color"] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--ln2); border-radius: 6px; background: none; }
.kn__u { width: 2.2em; font: 500 11px/1 var(--font-mono); color: var(--tx3); }
.kn[data-on] > label { color: var(--acc2); }
.knote { padding: 10px 12px; border: 1px dashed var(--ln2); border-radius: var(--r-sm); font-size: var(--fs-s); color: var(--tx3); }
.krow { display: flex; flex-wrap: wrap; gap: 8px; }
.desc { display: grid; gap: 10px; margin: 0; }
.desc dt { font-size: var(--fs-xs); font-weight: 700; color: var(--tx3); }
.desc dd { margin: 2px 0 0; font-size: var(--fs-s); color: var(--tx); }
.desc dd code { font: 500 11px/1 var(--font-mono); color: var(--tx3); }
.adv { border: 1px solid var(--ln); border-radius: var(--r-sm); }
.adv summary { cursor: pointer; padding: 9px 11px; font-size: var(--fs-s); color: var(--tx2); }
.adv__b { display: grid; gap: 8px; padding: 2px 11px 11px; font-size: var(--fs-s); color: var(--tx3); }
.cmd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: var(--bg0); }
.cmd code { flex: 1; min-width: 0; font: 500 var(--fs-xs)/1.5 var(--font-mono); color: var(--tx); overflow-wrap: anywhere; }
.exs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; align-items: start; }
.ex { display: grid; gap: 4px; align-content: start; min-width: 0; text-align: left; }
.ex__f { border: 1px solid var(--ln); border-radius: 6px; overflow: hidden; background: var(--stage); }
.ex b { font-size: var(--fs-xs); }
.ex span { font-size: 11px; line-height: 1.5; color: var(--tx3); }
button.ex:hover .ex__f { border-color: var(--ln3); }
.ex .demo { border: 0; }
.cu { fill: #f4ede4; opacity: .62; }

/* 絵の左右の矢印。絵の上にカーソルを乗せると、ふわっと出る */
.parrow { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: rgba(7, 6, 5, .62); color: #fff; opacity: 0; transition: opacity .25s ease, background .2s; }
.parrow--l { left: 26px; } .parrow--r { right: 26px; }
.parrow svg { width: 20px; height: 20px; }
.parrow:hover { background: rgba(7, 6, 5, .9); }
.pop__l:hover .parrow, .parrow:focus-visible { opacity: 1; }
@media (hover: none) { .parrow { opacity: .7; } }
@media (max-width: 760px) { .parrow { width: 36px; height: 36px; margin-top: -18px; opacity: .75; } .parrow--l { left: 8px; } .parrow--r { right: 8px; } }
.pclose { position: absolute; right: 10px; top: 10px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center; background: rgba(7, 6, 5, .7); color: #fff; }
.pclose svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .pclose { display: grid; } #apop-close { display: none; } }   /* 狭い画面は、絵の上の × だけにする（常に見えるため） */
/* 音の操作: 前の曲・10 秒戻す・再生・10 秒送る・次の曲 */
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); border: 1px solid var(--ln2); color: var(--tx); }
.ibtn:hover { background: var(--bg4); }
.ibtn svg { width: 20px; height: 20px; }
#apop-ctl { justify-content: center; }
#apop-ctl .clock { margin-left: 8px; }

.status { padding: 9px 12px; border-radius: var(--r-sm); background: var(--bg2); font-size: var(--fs-s); color: var(--tx2); }
.status b { color: var(--tx); }
.status[data-plan] { background: var(--acc-soft); }
.lic summary { cursor: pointer; }
.lic p { margin: 6px 0 4px; font-size: var(--fs-s); color: var(--tx2); }
.cta { display: grid; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--paid) 45%, transparent); border-radius: var(--r); background: color-mix(in srgb, var(--paid) 9%, transparent); }
.cta p { font-size: var(--fs-s); color: var(--tx2); }
.cta b { color: var(--tx); }
a.btn { text-decoration: none; }

/* ── メモとトースト ── */
.memo { margin-top: 44px; padding: 14px 16px; border: 1px dashed var(--ln3); border-radius: var(--r); color: var(--tx2); font-size: var(--fs-s); max-width: 60em; }
.memo h2 { font: 700 var(--fs-xs)/1.4 var(--font-jp); letter-spacing: .08em; color: var(--tx3); margin-bottom: 6px; }
.memo ul { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 9px 16px; border-radius: 99px; background: var(--bg4); border: 1px solid var(--ln2); color: var(--tx); font-size: var(--fs-s); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 20; }
.toast[data-on] { opacity: 1; }

@media (max-width: 900px) {
  /* 狭い画面では、左の分類を横に送れる 1 行にする */
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .clockbar { position: static; }
  .rail { position: static; max-height: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .rail .seg { width: auto; flex: none; }
  .rail .seg button { flex: none; padding: 0 12px; }
  .rail .subs__row { display: contents; }
  .rail .subs__l { flex: none; padding: 0 0 0 6px; letter-spacing: 0; }
  .rail .chip { width: auto; flex: none; height: 32px; padding: 0 13px; background: var(--bg2); border-color: var(--ln); border-radius: 99px; }
  .rail .chip .n { margin-left: 0; }
}
@media (max-width: 760px) {
  .top .search { order: 3; flex-basis: 100%; max-width: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .cat__h h1 { font-size: 24px; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stage h3 { padding-top: 0; }
  .notes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .subs__row { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .subs__l { flex: none; }
  /* スマホではポップアップを全画面にして、見本を上に固定する */
  dialog.pop { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; }
  .pop__in { grid-template-columns: minmax(0, 1fr); }
  .pop__l { position: sticky; top: 0; z-index: 2; padding: 10px 12px; gap: 8px; border-bottom: 1px solid var(--ln); }
  .pop__r { padding: 14px 16px; }
  .pop__nav { position: sticky; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .st *, .st *::before, .st *::after { animation: none !important; }
  .tile, .card, .toast, #cat { transition: none; }
  .acard__th--bg { animation: none; }
}

/* ── 本番で足したもの: 読み込み中・見本の絵（本物の URL）・ログイン ── */
body[data-loading] .wrap { visibility: hidden; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--tx3); font-size: var(--fs-s); }
body:not([data-loading]) .boot { display: none; }
.ath { display: block; width: 100%; height: 100%; object-fit: cover; }
.acard__th[data-fit] .ath { object-fit: contain; }
.acard__th[data-fit="light"] { background: #f1efe9; }
.acard__th[data-fit="dark"] { background: #262b38; }
.acard__th[data-fit="cream"] { background: #f4ede4; }
.au__c .ath { object-fit: cover; }
#apop-th img.hi { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.acards__more { grid-column: 1 / -1; justify-self: center; }
dialog.login { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--ln2); border-radius: 14px; background: var(--bg1); color: var(--tx); }
dialog.login::backdrop { background: rgba(0, 0, 0, .7); }
.login__in { display: grid; gap: 12px; padding: 20px; }
.login__h { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.login__h h2 { font: 700 var(--fs-xl)/1.4 var(--font-jp); }
.login p { font-size: var(--fs-s); color: var(--tx2); }
.login label { display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--tx3); }
.login input[type="email"] { height: 42px; padding: 0 12px; border: 1px solid var(--ln2); border-radius: 8px; background: var(--bg2); color: var(--tx); font: 400 var(--fs-m)/1 var(--font-jp); }
.login .opt { display: flex; align-items: center; gap: 8px; font-size: var(--fs-s); color: var(--tx2); }
.login__msg { min-height: 1.6em; color: var(--acc2); overflow-wrap: anywhere; }
.pill[href] { text-decoration: none; }
