/* 名刺型LP（v8）の共通の部品。どのデザインでも同じものを使う。書きかえない。
   スマホ・Instagram の画面・リールの画面・作品の表紙・流れる帯・作品をくわしく見る窓。
   色や書体はデザインごとの style.css で決める（ここは形だけ）。 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { display: block; }
.noscript { padding: 40px; text-align: center; }

/* ── アイコン（写真がないときは頭文字） ── */
.av { position: relative; display: inline-grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; overflow: hidden; background: #e9e2da; color: #5a4e44; font-weight: 700; flex: none; line-height: 1; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── 作品の表紙（写真か動画。なければ2色の地に文字） ── */
.cover { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--a, #999); }
.cover img, .cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover video { opacity: 0; transition: opacity .5s; }
.cover video.is-loaded, .cover video[poster] { opacity: 1; }
.cover.no-media { background: var(--b, #333); }
.cap { position: absolute; left: 0; right: 0; top: 30%; z-index: 1; padding: 0 8%; display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif; font-weight: 800; line-height: 1.3; letter-spacing: 0; text-shadow: 0 1px 3px rgba(0,0,0,.5), 0 0 16px rgba(0,0,0,.35); pointer-events: none; }
.cover.no-media .cap { text-shadow: none; }

/* ── スマホ（--w で幅を決めると、ほかは全部それに合わせて決まる） ── */
.phone { --w: 240px; position: relative; flex: none; width: var(--w); aspect-ratio: 9 / 19.5; border-radius: calc(var(--w) * .165); padding: calc(var(--w) * .032); background: #1d1c1b; box-shadow: inset 0 0 0 1.5px #4b4845, inset 0 0 0 3px #121212, 0 30px 60px -28px rgba(20, 15, 10, .5), 0 10px 20px -12px rgba(20, 15, 10, .28); }
.island { position: absolute; top: calc(var(--w) * .052); left: 50%; width: calc(var(--w) * .3); height: calc(var(--w) * .088); transform: translateX(-50%); background: #0a0a0a; border-radius: 99px; z-index: 6; pointer-events: none; }
.screen-wrap { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .135); overflow: hidden; background: #fff; isolation: isolate; }
.screen { position: relative; width: 100%; height: 100%; background: #fff; color: #111; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Helvetica Neue", "Yu Gothic UI", "Noto Sans JP", sans-serif; font-size: calc(var(--w) * .043); line-height: 1.35; letter-spacing: 0; font-feature-settings: normal; text-align: left; }
.screen.ig { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.screen.ig::-webkit-scrollbar { display: none; }
.screen svg { width: 1.6em; height: 1.6em; }

/* Instagram のプロフィール */
.ig-status { display: flex; justify-content: space-between; align-items: center; padding: 1.15em 1.9em .4em 2.2em; font-size: .95em; position: sticky; top: 0; background: #fff; z-index: 3; }
.ig-status svg { width: 4.6em; height: 1em; }
.ig-status.light { background: transparent; color: #fff; position: absolute; left: 0; right: 0; }
.ig-top { display: flex; justify-content: space-between; align-items: center; padding: .5em 1.1em .7em; }
.ig-top b { display: flex; align-items: center; gap: .2em; font-size: 1.25em; font-weight: 700; }
.ig-top b svg { width: 1em; height: 1em; }
.ig-top > span { display: flex; gap: 1.1em; }
.ig-head { display: flex; align-items: center; gap: 1.1em; padding: .2em 1.1em .5em; }
.ring { flex: none; padding: .2em; border-radius: 50%; background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.ring .av { width: 5.6em; height: 5.6em; border: .22em solid #fff; font-size: 1em; }
.ig-name { display: block; font-size: 1.02em; margin-bottom: .35em; }
.ig-stats { display: flex; gap: 1.1em; }
.ig-stats li { display: flex; flex-direction: column; }
.ig-stats b { font-size: 1.1em; }
.ig-stats li > span { font-size: .82em; white-space: nowrap; }
.ig-bio { padding: 0 1.1em .7em; font-size: .95em; line-height: 1.4; }
.ig-bio .cat { color: #737373; display: block; }
.ig-bio .lnk { color: #00376b; font-weight: 600; }
.ig-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; padding: 0 1.1em .9em; }
.ig-btns > span { display: flex; align-items: center; justify-content: center; gap: .2em; background: #efefef; border-radius: .6em; padding: .55em 0; font-weight: 600; font-size: .95em; }
.ig-btns svg { width: 1em; height: 1em; }
.ig-hl { display: flex; gap: 1.05em; padding: 0 1.1em .9em; overflow: hidden; }
.ig-hl a { display: flex; flex-direction: column; align-items: center; gap: .35em; text-decoration: none; font-size: .82em; width: 4.6em; flex: none; color: inherit; }
.ig-hl i { position: relative; display: block; width: 4.6em; height: 4.6em; border-radius: 50%; border: 1px solid #dbdbdb; }
.ig-hl i .cover { inset: .2em; border-radius: 50%; }
.ig-hl a > span { white-space: nowrap; }
.ig-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #efefef; }
.ig-tabs > span { display: flex; justify-content: center; padding: .65em 0; color: #8e8e8e; }
.ig-tabs > span.on { color: #111; box-shadow: inset 0 -1.5px #111; }
.ig-tabs svg { width: 1.45em; height: 1.45em; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; padding-bottom: 2em; }
.ig-tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; }
.ig-tile .cap { font-size: .62em; }
.ig-reel { position: absolute; top: .45em; right: .45em; color: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); z-index: 2; }
.ig-reel svg { width: 1.2em; height: 1.2em; }
.ig-tile em { position: absolute; left: .45em; bottom: .4em; z-index: 2; display: flex; align-items: center; gap: .2em; color: #fff; font-style: normal; font-size: .78em; font-weight: 600; text-shadow: 0 0 3px rgba(0,0,0,.5); }
.ig-tile em svg { width: 1em; height: 1em; }
.ig-home { position: absolute; left: 50%; bottom: .55em; width: 36%; height: .32em; transform: translateX(-50%); border-radius: 99px; background: #111; z-index: 6; }
.ig-home.light { background: #fff; }

/* リールの画面 */
.reel { background: #000; color: #fff; overflow: hidden; }
.reel .cap { top: 30%; font-size: 1.5em; }
.reel-ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.reel-ui::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.reel-top { position: absolute; top: 3.2em; left: 1.2em; right: 1.2em; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.15em; z-index: 1; }
.reel-side { position: absolute; right: .8em; bottom: 5.5em; display: flex; flex-direction: column; gap: 1.1em; z-index: 1; }
.reel-bottom { position: absolute; left: 1em; right: 3.6em; bottom: 1.9em; z-index: 1; }
.reel-who { display: flex; align-items: center; gap: .5em; font-weight: 600; font-size: .95em; }
.reel-who .av { width: 2.1em; height: 2.1em; font-size: .9em; }
.reel-who i { font-style: normal; border: 1px solid rgba(255,255,255,.7); border-radius: .4em; padding: .05em .55em; font-size: .85em; }
.reel-caption { margin-top: .5em; font-size: .9em; }
.reel-audio { display: flex; align-items: center; gap: .3em; margin-top: .4em; font-size: .8em; }
.reel-audio svg { width: 1.1em; height: 1.1em; }
.reel-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.3); z-index: 3; }
.reel-bar i { display: block; height: 100%; width: 0; background: #fff; }
.playing .reel-bar i { animation: lp-reelbar 12s linear infinite; }
@keyframes lp-reelbar { from { width: 0; } to { width: 100%; } }

/* ── 横に流れつづける帯（LP.marquee） ── */
.lp-marquee { overflow: hidden; touch-action: pan-y; cursor: grab; }
.lp-marquee.is-grab { cursor: grabbing; user-select: none; }
.lp-marquee-track { display: flex; width: max-content; will-change: transform; }
.lp-marquee.is-static { overflow-x: auto; cursor: auto; }

/* ── HTML-in-Canvas で描くときの入れ物（LP.gl） ── */
.lp-gl { display: block; width: 100%; }
.lp-gl > * { width: 100%; }
.lp-gl.lp-gl-fill { position: absolute; inset: 0; height: 100%; }
.lp-gl.lp-gl-fill > * { height: 100%; }

/* ── グラフ（LP.chartSvg）：色はデザインの側で上書きする ── */
.lp-chart { width: 100%; height: auto; overflow: visible; --len: 2000; }
.lp-chart .gl { stroke: currentColor; opacity: .14; stroke-width: 1; stroke-dasharray: 3 4; }
.lp-chart .area { fill: var(--accent, currentColor); opacity: 0; transition: opacity 1s .8s; }
.lp-chart .line { fill: none; stroke: var(--accent, currentColor); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.6s cubic-bezier(.16, 1, .3, 1); }
.lp-chart .dot { fill: var(--chart-bg, #fff); stroke: var(--accent, currentColor); stroke-width: 2.5; }
.lp-chart .dot.last { fill: var(--accent, currentColor); }
.lp-chart text { font-size: 12px; fill: currentColor; opacity: .6; }
.lp-chart .val { opacity: 1; font-weight: 700; }
.in .lp-chart .line, .lp-chart.in .line { stroke-dashoffset: 0; }
.in .lp-chart .area, .lp-chart.in .area { opacity: .1; }

/* ── 作品をくわしく見る窓（色・書体は --v-* で変えられる） ── */
.viewer { width: min(940px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: var(--v-radius, 28px); background: var(--v-bg, #fff); color: var(--v-ink, #1c1c1c); overflow: auto; }
.viewer::backdrop { background: var(--v-backdrop, rgba(16, 14, 12, .66)); }
.viewer[open] { animation: lp-vin .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes lp-vin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.viewer-close { position: absolute; top: 16px; right: 16px; z-index: 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--v-card, rgba(127,127,127,.12)); }
.viewer-close svg { width: 20px; height: 20px; }
.viewer-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 48px; padding: 44px 52px; align-items: center; }
.viewer-phone { --w: 256px; }
.viewer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.viewer-tags span { padding: 3px 12px; font-size: 12px; font-weight: 700; border-radius: 99px; background: var(--v-card, rgba(127,127,127,.12)); }
.viewer-tags span:first-child { background: var(--v-accent-soft, var(--v-card, rgba(127,127,127,.12))); color: var(--v-accent, inherit); }
.viewer-text h3 { margin-top: 10px; font-size: 26px; line-height: 1.5; }
.viewer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 13px; opacity: .85; }
.viewer-meta b { display: inline-flex; align-items: center; gap: 4px; }
.viewer-meta svg { width: 13px; height: 13px; }
.viewer-text dl { margin-top: 22px; display: grid; gap: 10px; }
.viewer-text dl div { padding: 15px 20px; background: var(--v-card, rgba(127,127,127,.1)); border-radius: var(--v-radius-s, 16px); }
.viewer-text dt { font-size: 12px; font-weight: 800; color: var(--v-accent, inherit); }
.viewer-text dd { margin-top: 2px; font-size: 14px; line-height: 1.85; }
.viewer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.viewer-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.viewer-link svg { width: 16px; height: 16px; }
.viewer-steps { display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: .9; }
.viewer-steps button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--v-card, rgba(127,127,127,.12)); }
.viewer-steps svg { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .viewer-in { grid-template-columns: 1fr; padding: 60px 20px 28px; gap: 26px; justify-items: center; }
  .viewer-text { width: 100%; }
  .viewer-phone { --w: 214px; }
}

/* ── 見本の札 ── */
.sample-badge { position: fixed; left: 14px; bottom: 14px; z-index: 80; margin: 0; padding: 6px 14px; font: 700 12px/1.5 -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif; letter-spacing: .02em; background: rgba(20, 20, 20, .86); color: #fff; border-radius: 99px; }

@media (prefers-reduced-motion: reduce) {
  .playing .reel-bar i { animation: none; }
  .lp-chart .line { transition: none; }
}
