.ex-works{background:#f6f4ee;color:#16181a}
.ex-stage{position:relative;min-height:calc(100svh + 25vh);outline:0;--ex-c:#a8455c;
  --ex-m:max(5vw,calc(50% - 600px));--ex-w:min(52vw,640px);--ex-h:calc(var(--ex-w)*.625);--ex-t:calc(50% - var(--ex-h)/2)}
.ex-pin{position:sticky;top:0;height:100svh;min-height:480px}
/* 完成形（JSなし・動きを減らす設定ではこの状態のまま） */
.ex-plane{position:absolute;left:var(--ex-m);top:var(--ex-t);width:var(--ex-w);height:var(--ex-h);overflow:hidden;border-radius:6px;background:#f6f4ee;box-shadow:0 18px 50px rgba(22,24,26,.14)}
.ex-video,.ex-shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top}
.ex-video{opacity:0}
.ex-looks{position:absolute;inset:12% 6%;display:grid;grid-template-columns:repeat(4,1fr);gap:2.2%;opacity:0;visibility:hidden}
.ex-look{position:relative;padding:0;border:0;background:none;cursor:pointer;min-height:0}
.ex-look img{display:block;width:100%;height:100%;object-fit:cover}
.ex-look span{position:absolute;left:8px;top:6px;font-size:12px;letter-spacing:.1em;color:#fff;mix-blend-mode:difference}
.ex-text{position:absolute;left:calc(var(--ex-m) + var(--ex-w) + 4vw);right:var(--ex-m);top:50%;transform:translateY(-50%)}
.ex-kind{margin:0 0 .9em;font-size:12px;letter-spacing:.12em;color:#1f8a84}
.ex-title{margin:0;font-size:clamp(26px,3.2vw,44px);font-weight:500;line-height:1.3}
.ex-lead{margin:.8em 0 0;font-size:clamp(15px,1.4vw,19px);line-height:1.7}
.ex-body{margin:1em 0 0;font-size:14px;line-height:1.9;opacity:.82}
.ex-swatches{display:flex;gap:10px;margin-top:1.2em}
.ex-sw{width:26px;height:26px;padding:0;border:2px solid #f6f4ee;border-radius:50%;background:var(--c);cursor:pointer}
.ex-sw.is-on{box-shadow:0 0 0 2px #1f8a84}
.ex-links{display:flex;flex-wrap:wrap;gap:8px 22px;margin:1.4em 0 0}
.ex-link{color:inherit;font-size:14px;text-decoration:none;padding-bottom:4px;border-bottom:1px solid #1f8a84}
[data-ex="look"] .ex-link{border-color:var(--ex-c)}
.ex-link:hover{color:#1f8a84}
.ex-replay{display:none;margin-top:1.4em;padding:0;border:0;background:none;color:inherit;font:inherit;font-size:12px;opacity:.6;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.ex-live .ex-replay{display:inline-block}
.ex-works :focus-visible{outline:2px solid #16181a;outline-offset:3px}

/* 導入（JSあり・未着地）：同じ面が全面に広がっている */
.ex-live .ex-stage:not(.is-settled) .ex-plane{left:0;top:0;width:100%;height:100%;border-radius:0;box-shadow:none}
.ex-live .ex-stage:not(.is-settled) .ex-shot{opacity:0}
.ex-live .ex-stage:not(.is-settled) :is(.ex-video,.ex-looks){opacity:1;visibility:visible}
.ex-live .ex-stage:not(.is-settled) .ex-text{opacity:0;visibility:hidden}
/* 着地：位置とサイズを連続して変える */
.ex-live .is-settled .ex-plane{transition:left .78s cubic-bezier(.28,.04,.22,1),top .78s cubic-bezier(.28,.04,.22,1),width .78s cubic-bezier(.28,.04,.22,1),height .78s cubic-bezier(.28,.04,.22,1),border-radius .78s,box-shadow .45s .25s}
.ex-live .is-settled .ex-shot{transition:opacity .44s .29s}
.ex-live .is-settled :is(.ex-video,.ex-looks){transition:opacity .44s .29s,visibility 0s .76s}
.ex-live .is-settled .ex-text{transition:opacity .44s .28s}

@media (max-width:800px){
  .ex-stage{--ex-m:5vw;--ex-w:90vw;--ex-t:max(56px,8svh)}
  .ex-text{left:5vw;right:5vw;top:calc(var(--ex-t) + var(--ex-h) + 24px);transform:none}
  .ex-looks{inset:9% 7%;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:3%}
  .ex-body{font-size:13px;line-height:1.8}
}
@media (max-width:800px) and (max-height:640px){
  .ex-stage{--ex-w:64vw;--ex-m:18vw;--ex-t:44px}
  .ex-text{left:5vw;right:5vw}
  .ex-lead{margin-top:.4em}.ex-body{margin-top:.6em}
}

.ex-title span { display:inline-block; }
[data-ex="moon"] .ex-title { font-family:"Hiragino Mincho ProN","Yu Mincho",serif; letter-spacing:.07em; }
[data-ex="look"] { --ex-h:calc(var(--ex-w) * .61158); }
.ex-look span { top:auto; left:0; bottom:-26px; color:#392937; mix-blend-mode:normal; font-size:12px; }
.ex-looks { background:transparent; }
[data-ex="look"] .ex-plane { background:#fcf1f2; }
.ex-swatches { align-items:center; }
.ex-shade-name { font-size:12px; }
.ex-final-pick { position:absolute; top:38.5%; bottom:6%; left:calc(var(--ex-col,2) * 25% + .5%); width:24%; border:2px solid #1f8a84; opacity:0; pointer-events:none; }
.ex-manual.is-settled .ex-final-pick { opacity:1; transition:opacity .4s 1s,left .2s; }
.ex-works:not(.ex-interactive) .ex-swatches {display:none}
@media(min-width:801px) {
  .ex-live .is-settled .ex-looks { inset:38.5% 0 6%;gap:0;transition:inset .78s ease-out,gap .78s,opacity .44s .29s,visibility 0s .76s; }
}
@media(max-width:800px) {
  .ex-looks { row-gap:34px; }
  .ex-look span { bottom:-23px; }
  .ex-pin { min-height:max(480px,calc(var(--ex-t) + var(--ex-h) + 310px)); }
}
@media(prefers-reduced-motion:reduce) {
  .ex-stage {min-height:0;}
  .ex-pin {position:relative;}
  .ex-final-pick{transition:none!important;}
}

html { scrollbar-gutter:stable; }
html.ex-holding {
  overflow:hidden;
  overscroll-behavior:none;
  scroll-behavior:auto;
}

/* meltune intro: four uncropped photos, frames hug each photo (native --ratio) */
[data-ex="look"] .ex-looks{
  inset:9% 5% calc(9% + 30px);            /* extra bottom = pocket for colour names */
  display:flex;justify-content:center;align-items:center;gap:2%;
  container-type:size;isolation:isolate;
}
/* soft pink wash behind the crisp photos, clipped by .ex-plane */
[data-ex="look"] .ex-looks::before{
  content:"";position:absolute;inset:-100%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(36% 40% at 32% 40%,rgba(247,190,206,.85),transparent 72%),
    radial-gradient(34% 38% at 68% 62%,rgba(240,160,184,.6),transparent 72%),
    radial-gradient(30% 30% at 56% 30%,rgba(255,226,214,.9),transparent 72%),
    #fcf1f2;
}
/* width shared in proportion to each ratio (equal heights), capped by the available height */
[data-ex="look"] .ex-look{
  flex:calc(var(--ratio)) 1 0px;min-width:0;
  max-width:calc(100cqh * var(--ratio));
  aspect-ratio:var(--ratio);
}
[data-ex="look"] .ex-look img{
  display:block;width:100%;height:auto;
  aspect-ratio:var(--ratio);object-fit:contain;
}
[data-ex="look"] .ex-look span{
  position:absolute;left:0;top:100%;bottom:auto;padding-top:8px;
  font-size:12px;line-height:1.5;letter-spacing:.1em;white-space:nowrap;
  color:#392937;mix-blend-mode:normal;
}
[data-ex="look"].is-settled .ex-look span{opacity:0;transition:opacity .4s}

/* mobile: 2 x 2, height bounded by both the width and the height of the plane */
@media (max-width:800px){
  [data-ex="look"] .ex-looks{
    inset:7% 6% calc(7% + 26px);
    display:grid;grid-template:auto auto/auto auto;
    place-content:center;place-items:center;gap:40px 14px;
  }
  [data-ex="look"] .ex-look{
    flex:none;max-width:none;
    height:min((100cqh - 40px)/2,(100cqw - 14px)/1.5);
  }
}
