/* トップのヒーロー図版：スマホ画面フロー（2026-11-30 案Bを採用。試作は prototype-hero-phone.*） */

/* 見出しは開いた瞬間から表示（黒いブロック→線の演出と2秒の待ちをやめる） */
.hero-title-motion .hero-title-line{opacity:1!important;animation:dp-rise-in .7s cubic-bezier(.2,.65,.3,1) both!important}
.hero-title-motion .hero-title-bottom{animation-delay:.08s!important}
.hero-title-motion .hero-title-bar:before{opacity:0!important;animation:none!important}

.phone-flow{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:34px;min-width:0;height:560px}
.phone-flow:before{content:"";position:absolute;width:390px;height:390px;left:calc(50% - 120px);top:50%;transform:translate(-50%,-50%);border-radius:50%;background:var(--yellow);opacity:.55;z-index:-1}

/* 端末 */
.phone-flow-device{position:relative;flex:0 0 auto;width:262px;height:532px;padding:11px;border-radius:44px;background:#2b221c;box-shadow:0 0 0 2px #4a3c32 inset,16px 20px 0 rgba(53,43,36,.12),0 24px 50px rgba(53,43,36,.18)}
.phone-flow-device:before{content:"";position:absolute;left:50%;top:19px;width:74px;height:20px;transform:translateX(-50%);border-radius:12px;background:#2b221c;z-index:5}
.phone-screen{position:relative;width:100%;height:100%;overflow:hidden;border-radius:34px;background:var(--paper);font-family:'DM Sans','Noto Sans JP',sans-serif;color:var(--ink)}
.phone-status{position:absolute;inset:0 0 auto;z-index:4;display:flex;justify-content:space-between;align-items:center;height:42px;padding:6px 24px 0;font-size:10px;font-weight:700;color:var(--ink);transition:color .3s}
.phone-status-icons{display:flex;gap:3px}.phone-status-icons i{width:4px;height:8px;border-radius:1px;background:currentColor}.phone-status-icons i:nth-child(2){height:6px;align-self:flex-end}.phone-status-icons i:nth-child(3){width:14px;border-radius:2px}
.phone-flow[data-dark] .phone-status{color:#fffaf2}
.phone-image-label{position:absolute;right:10px;bottom:8px;z-index:6;padding:2px 7px;border-radius:999px;background:rgba(53,43,36,.55);color:#fffaf2;font-size:8px;font-weight:700;letter-spacing:.04em}

/* 画面の切り替え */
.screen{position:absolute;inset:0;padding-top:42px;opacity:0;visibility:hidden;transform:translateX(18px);transition:opacity .45s ease,transform .55s cubic-bezier(.2,.7,.25,1),visibility .45s}
.screen.is-active{opacity:1;visibility:visible;transform:none}
.screen .s-item{opacity:0;translate:0 10px}
.screen.is-active .s-item{animation:dp-rise-in .5s cubic-bezier(.2,.65,.3,1) both}
.screen.is-active .s-item:nth-child(2){animation-delay:.08s}.screen.is-active .s-item:nth-child(3){animation-delay:.16s}.screen.is-active .s-item:nth-child(4){animation-delay:.24s}.screen.is-active .s-item:nth-child(5){animation-delay:.32s}.screen.is-active .s-item:nth-child(6){animation-delay:.4s}

/* 共通の骨組み */
.sk{display:block;border-radius:4px;background:#e6dccd}
.sk-line{height:8px;margin:0 0 7px}.sk-line.light{background:rgba(255,250,242,.55)}
.w90{width:90%}.w80{width:80%}.w70{width:70%}.w60{width:60%}.w50{width:50%}

/* 01 商品ページ */
.screen-topbar{display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 16px;font-size:11px;font-weight:800}
.ico-back,.ico-cart{width:14px;height:14px;border:2px solid var(--ink);border-radius:3px}.ico-back{border-width:0 0 2px 2px;border-radius:0;transform:rotate(45deg) scale(.7)}
.product-hero{margin:4px 14px 0;border-radius:14px;background:#f4e6d3;height:168px;display:grid;place-items:center}.product-hero svg{width:88%}
.product-body{padding:14px 16px 0}
.sk-tag{display:inline-block;width:auto;height:auto;padding:2px 7px;margin-bottom:9px;background:#e3ece9;color:#3f6d5f;font-size:9px;font-weight:800}
.sk-price{width:38%;height:14px;margin:10px 0 12px;background:var(--orange);opacity:.85}
.product-points{display:flex;gap:6px;margin-bottom:14px}.product-points span{flex:1;height:30px;border-radius:8px;background:#f1e8db}
.screen-btn{display:block;padding:10px 0;border-radius:999px;background:var(--orange);color:#fff;text-align:center;font-size:11px;font-weight:800}
.screen-product.is-active .screen-btn{animation:dp-rise-in .5s cubic-bezier(.2,.65,.3,1) .4s both,phone-btn-tap .5s ease 2.1s}
@keyframes phone-btn-tap{50%{transform:scale(.94);filter:brightness(.92)}}

/* 02 ショート動画 */
.screen-video{padding-top:0;background:#2b221c;color:#fffaf2}
.video-stage{position:absolute;inset:0}.video-stage svg{width:100%;height:100%;object-fit:cover}
.video-progress{position:absolute;left:14px;right:14px;top:46px;z-index:3;height:3px;border-radius:2px;background:rgba(255,250,242,.3);overflow:hidden}
.video-progress span{display:block;height:100%;width:0;background:#fffaf2}
.screen-video.is-active .video-progress span{animation:phone-progress 3.4s linear both}
@keyframes phone-progress{to{width:100%}}
.screen-video.is-active .video-product{animation:phone-product-bob 1.6s ease-in-out .3s 2 alternate both;transform-box:fill-box;transform-origin:center}
@keyframes phone-product-bob{to{transform:translateY(-8px) rotate(-4deg)}}
.video-actions{position:absolute;right:10px;bottom:118px;z-index:3;display:flex;flex-direction:column;gap:12px}
.va{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(255,250,242,.16);color:#fffaf2}.va svg{width:17px;height:17px}
.screen-video.is-active .va-heart{animation:phone-heart 0.5s ease 1.3s both}
@keyframes phone-heart{50%{transform:scale(1.25)}to{color:var(--orange);transform:scale(1)}}
.video-heart-pop{position:absolute;left:50%;top:44%;z-index:3;width:56px;height:56px;margin:-28px 0 0 -28px;color:var(--orange);opacity:0}
.screen-video.is-active .video-heart-pop{animation:phone-heart-pop .9s ease 1.2s both}
@keyframes phone-heart-pop{0%{opacity:0;transform:scale(.4)}30%{opacity:1;transform:scale(1.1)}70%{opacity:1;transform:scale(1) translateY(-6px)}100%{opacity:0;transform:scale(1) translateY(-20px)}}
.video-caption{position:absolute;left:14px;right:56px;bottom:26px;z-index:3}
.video-tag{display:inline-flex;align-items:center;gap:5px;margin-top:6px;padding:5px 10px;border-radius:6px;background:#fffaf2;color:var(--ink);font-size:10px;font-weight:800}.video-tag svg{width:13px;height:13px;color:var(--orange)}
.screen-video.is-active .video-tag{animation:dp-rise-in .45s ease 1.9s both}

/* 03 LIVE */
.screen-live{padding-top:0;background:#f4e6d3}
.live-stage{position:absolute;inset:0}.live-stage svg{width:100%;height:100%}
.live-top{position:absolute;left:14px;right:14px;top:48px;z-index:3;display:flex;justify-content:space-between;align-items:center}
.live-badge{padding:3px 8px;border-radius:4px;background:#d9412b;color:#fff;font-size:10px;font-weight:900;letter-spacing:.08em}
.screen-live.is-active .live-badge{animation:phone-live-pulse 1.2s ease-in-out infinite}
@keyframes phone-live-pulse{50%{opacity:.6}}
.live-viewers{display:flex}.live-viewers i{width:18px;height:18px;margin-left:-5px;border:2px solid #f4e6d3;border-radius:50%;background:#ced9d8}.live-viewers i:nth-child(2){background:#f1cb5a}.live-viewers i:nth-child(3){background:#e96a39}
.live-chat{position:absolute;left:14px;bottom:102px;z-index:3;display:flex;flex-direction:column;gap:6px;width:62%}
.chat{display:block;height:20px;border-radius:999px;background:rgba(53,43,36,.55);opacity:0}.chat.c1{width:78%}.chat.c2{width:96%}.chat.c3{width:64%}
.screen-live.is-active .chat{animation:dp-rise-in .4s ease both}.screen-live.is-active .c1{animation-delay:.5s}.screen-live.is-active .c2{animation-delay:1.1s}.screen-live.is-active .c3{animation-delay:1.7s}
.live-pin{position:absolute;left:12px;right:12px;bottom:34px;z-index:3;display:flex;align-items:center;gap:9px;padding:8px;border-radius:12px;background:#fffaf2;box-shadow:0 6px 16px rgba(53,43,36,.15)}
.screen-live.is-active .live-pin{animation:dp-rise-in .45s ease 2s both}
.live-pin-img{flex:0 0 34px;height:34px;border-radius:8px;background:var(--orange)}
.live-pin-text{flex:1}.live-pin-text .sk-line{margin-bottom:5px;height:6px}
.live-pin-btn{padding:6px 10px;border-radius:999px;background:var(--ink);color:#fff;font-size:10px;font-weight:800}

/* 04 注文・分析 */
.screen-order{background:#f4eee4;padding:52px 14px 0}
.order-toast{display:flex;align-items:center;gap:9px;padding:10px;border-radius:14px;background:#fffaf2;box-shadow:0 8px 20px rgba(53,43,36,.14)}
.screen-order.is-active .order-toast{animation:phone-toast .6s cubic-bezier(.2,.75,.3,1.2) .15s both}
@keyframes phone-toast{from{opacity:0;transform:translateY(-26px) scale(.96)}to{opacity:1;transform:none}}
.order-toast-icon{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:9px;background:var(--orange);color:#fff}.order-toast-icon svg{width:17px;height:17px}
.order-toast-text b{display:block;font-size:11px;line-height:1.4}.order-toast-text small{font-size:9px;color:var(--muted)}
.order-panel{margin-top:14px;padding:14px;border-radius:14px;background:#fffaf2}
.order-panel-title{display:block;margin-bottom:10px;font-size:11px;font-weight:800}
.order-chart{position:relative;display:flex;align-items:flex-end;gap:9px;height:130px;padding:0 4px;border-bottom:1px solid var(--line)}
.order-chart>span{flex:1;height:var(--h);border-radius:4px 4px 0 0;background:#ced9d8;transform-origin:bottom;transform:scaleY(0)}
.order-chart>span:last-of-type{background:var(--yellow)}
.screen-order.is-active .order-chart>span{animation:phone-bar .6s cubic-bezier(.2,.7,.25,1) both}
.screen-order.is-active .order-chart>span:nth-child(1){animation-delay:.6s}.screen-order.is-active .order-chart>span:nth-child(2){animation-delay:.7s}.screen-order.is-active .order-chart>span:nth-child(3){animation-delay:.8s}.screen-order.is-active .order-chart>span:nth-child(4){animation-delay:.9s}.screen-order.is-active .order-chart>span:nth-child(5){animation-delay:1s}
@keyframes phone-bar{to{transform:scaleY(1)}}
.order-chart svg{position:absolute;inset:6px 4px 0;width:calc(100% - 8px);height:calc(100% - 6px)}
.order-line{stroke-dasharray:100;stroke-dashoffset:100}
.screen-order.is-active .order-line{animation:phone-line .9s ease 1.3s both}
@keyframes phone-line{to{stroke-dashoffset:0}}
.order-notes{display:flex;flex-direction:column;gap:6px;margin-top:12px;font-size:10px;font-weight:700}
.order-notes span{display:flex;align-items:center;gap:6px;opacity:0}.order-notes i{width:14px;height:14px;border-radius:50%;background:#e3ece9;position:relative}.order-notes i:after{content:"";position:absolute;left:4px;top:3px;width:4px;height:6px;border:solid #3f6d5f;border-width:0 2px 2px 0;transform:rotate(40deg)}
.screen-order.is-active .order-notes span{animation:dp-rise-in .4s ease both}.screen-order.is-active .order-notes span:nth-child(1){animation-delay:2s}.screen-order.is-active .order-notes span:nth-child(2){animation-delay:2.3s}

/* ステップ（支援範囲） */
.phone-flow-steps{flex:0 0 186px;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.phone-step{position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:12px 12px 14px;border:0;background:transparent;color:var(--ink);text-align:left;cursor:pointer;border-radius:10px;transition:background .3s,opacity .3s;opacity:.5}
.phone-step:hover{opacity:.8}
.phone-step.is-active{opacity:1;background:rgba(255,250,242,.85);box-shadow:5px 6px 0 rgba(53,43,36,.08)}
.phone-step:focus-visible{outline:3px solid var(--orange-text);outline-offset:2px}
.phone-step-num{font-family:var(--serif);font-size:20px;line-height:1;color:var(--orange-text)}
.phone-step-text b{display:block;font-size:14px;line-height:1.35;font-weight:800}
.phone-step-text small{display:block;font-size:11px;line-height:1.5;color:#5f5a53}
.phone-step-bar{position:absolute;left:12px;right:12px;bottom:6px;height:2px;border-radius:2px;background:transparent;overflow:hidden}
.phone-step.is-active .phone-step-bar{background:rgba(53,43,36,.1)}
.phone-step-bar:after{content:"";position:absolute;inset:0;transform:scaleX(0);transform-origin:left;background:var(--orange)}
.phone-flow.is-playing .phone-step.is-active .phone-step-bar:after{animation:phone-step-fill var(--step-duration,3400ms) linear both}
@keyframes phone-step-fill{to{transform:scaleX(1)}}

@media(max-width:1100px){
  .phone-flow{gap:20px}
  .phone-flow-device{width:232px;height:472px}
  .phone-flow-steps{flex-basis:160px}
  .phone-step-text b{font-size:13px}
}
@media(max-width:900px){
  .phone-flow{flex-direction:column;height:auto;gap:22px;padding:10px 0}
  .phone-flow:before{left:50%;top:240px;width:330px;height:330px}
  .phone-flow-steps{flex-basis:auto;width:100%;max-width:460px;display:grid;grid-template-columns:repeat(2,1fr)}
}
@media(max-width:680px){
  .phone-flow{margin-top:14px}
  .phone-flow:before{top:215px;width:290px;height:290px}
  .phone-flow-device{width:214px;height:436px;padding:9px;border-radius:38px}
  .phone-screen{border-radius:30px}
  .product-hero{height:136px}
  .phone-step{padding:10px 10px 12px;gap:9px}
  .phone-step-num{font-size:16px}
  .phone-step-text b{font-size:12px}
  .phone-step-text small{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
  .screen,.screen *,.phone-step-bar:after{animation:none!important;transition:none!important}
  .screen .s-item,.chat,.order-notes span,.video-heart-pop{opacity:1;translate:none}
  .video-heart-pop{opacity:0}
  .order-chart>span{transform:none}.order-line{stroke-dashoffset:0}
}


/* ===== 動きの追加（2026-11-30 2回目） ===== */

/* 端末がふわふわ浮く */
.phone-flow-device{animation:phone-float 5.2s ease-in-out infinite}
@keyframes phone-float{0%,100%{transform:translateY(0) rotate(-1.2deg)}50%{transform:translateY(-12px) rotate(1deg)}}

/* 画面の切り替えをスワイプ風に（入る画面は右から、出る画面は左へ） */
.screen{transform:translateX(40px) scale(.97)}
.screen.is-active{transform:none}
.screen.is-leaving{visibility:visible;opacity:0;transform:translateX(-40px) scale(.97);transition:opacity .45s ease,transform .5s cubic-bezier(.4,0,.6,1),visibility .45s}

/* 背景：点線の軌道と、回る小さな点 */
.phone-orbit{position:absolute;left:calc(50% - 120px);top:50%;width:460px;height:460px;margin:-230px 0 0 -230px;border:1.5px dashed rgba(53,43,36,.18);border-radius:50%;z-index:-1;animation:phone-orbit-spin 40s linear infinite}
.orbit-dot{position:absolute;border-radius:50%}
.od1{width:14px;height:14px;left:50%;top:-7px;margin-left:-7px;background:var(--orange)}
.od2{width:10px;height:10px;right:12%;bottom:8%;background:var(--ink)}
.od3{width:18px;height:18px;left:4%;top:62%;background:#ced9d8}
@keyframes phone-orbit-spin{to{transform:rotate(360deg)}}
.phone-flow:before{animation:phone-glow 5.2s ease-in-out infinite}
@keyframes phone-glow{0%,100%{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(1.05)}}

/* 画面の外に飛び出す吹き出し */
.phone-pops{position:absolute;inset:0;z-index:6;pointer-events:none}
.pop{position:absolute;display:inline-flex;align-items:center;gap:7px;padding:8px 12px 8px 8px;border-radius:999px;background:#fffaf2;color:var(--ink);font-size:12px;font-weight:800;white-space:nowrap;box-shadow:0 10px 24px rgba(53,43,36,.16);opacity:0;transform:translateY(10px) scale(.6);transform-origin:right center}
.pop-a{left:-96px;top:96px}
.pop-b{left:-70px;top:330px}
.pop-ic{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--orange);color:#fff}.pop-ic svg{width:15px;height:15px}
.pop-chat{padding:9px 14px;border-radius:16px 16px 4px 16px;background:var(--ink);color:#fffaf2}
.pop-chat.pop-b{border-radius:16px 16px 4px 16px;background:#fffaf2;color:var(--ink);left:-84px;top:300px}
.pop-heart{padding:0;width:30px;height:30px;justify-content:center;background:transparent;box-shadow:none;color:var(--orange)}
.pop-heart svg{width:100%;height:100%;filter:drop-shadow(0 4px 6px rgba(233,106,57,.35))}
.ph1{left:-30px;top:300px}.ph2{left:-58px;top:330px;width:22px;height:22px}.ph3{left:-14px;top:350px;width:18px;height:18px}

.phone-flow[data-step="0"] .pop-0,.phone-flow[data-step="1"] .pop-1:not(.pop-heart),.phone-flow[data-step="2"] .pop-2,.phone-flow[data-step="3"] .pop-3{animation:phone-pop-in .5s cubic-bezier(.2,.9,.3,1.35) .5s both}
.phone-flow[data-step="0"] .pop-0.pop-b,.phone-flow[data-step="1"] .pop-1.pop-b,.phone-flow[data-step="2"] .pop-2.pop-b,.phone-flow[data-step="3"] .pop-3.pop-b{animation-delay:1.3s}
@keyframes phone-pop-in{to{opacity:1;transform:none}}
.phone-flow[data-step="1"] .pop-heart{animation:phone-heart-float 2.2s ease-out .9s both}
.phone-flow[data-step="1"] .ph2{animation-delay:1.2s}.phone-flow[data-step="1"] .ph3{animation-delay:1.5s}
@keyframes phone-heart-float{0%{opacity:0;transform:translateY(20px) scale(.4)}20%{opacity:1;transform:translateY(0) scale(1.1)}100%{opacity:0;transform:translate(-18px,-170px) scale(.9) rotate(-14deg)}}

/* ステップ：選ばれている項目を少し右へ */
.phone-step{transition:background .3s,opacity .3s,transform .35s cubic-bezier(.2,.7,.25,1)}
.phone-step.is-active{transform:translateX(8px)}
.phone-step.is-active .phone-step-num{animation:phone-num-pop .45s cubic-bezier(.2,.9,.3,1.4) both}
@keyframes phone-num-pop{0%{transform:scale(.6)}100%{transform:scale(1)}}

@media(max-width:1360px) and (min-width:901px){.phone-flow{justify-content:flex-end;gap:24px}.phone-flow-device{width:236px;height:480px}.phone-flow:before{left:auto;right:20px;transform:translateY(-50%);width:340px;height:340px}.phone-orbit{left:auto;right:-20px;width:380px;height:380px;margin:-190px 0 0 0}.pop-a{left:-58px}.pop-b,.pop-chat.pop-b{left:-48px}.product-hero{height:146px}}
@keyframes phone-glow-r{0%,100%{transform:translateY(-50%) scale(1)}50%{transform:translateY(-50%) scale(1.05)}}
@media(max-width:1360px) and (min-width:901px){.phone-flow:before{animation-name:phone-glow-r}}

@media(max-width:900px){.phone-orbit{left:50%;top:240px}.phone-step.is-active{transform:none}}
@media(max-width:680px){
  .phone-orbit{top:215px;width:330px;height:330px;margin:-165px 0 0 -165px}
  .pop{font-size:10px;padding:6px 10px 6px 6px}.pop-ic{width:20px;height:20px}.pop-ic svg{width:12px;height:12px}
  .pop-a{left:-40px;top:70px}.pop-b{left:-26px;top:270px}
  .pop-chat.pop-b{left:-40px;top:240px}
  .ph1{left:-20px;top:240px}.ph2{left:-40px;top:262px}.ph3{left:-6px;top:280px}
}
@media(prefers-reduced-motion:reduce){
  .phone-flow-device,.phone-orbit,.phone-flow:before,.pop,.phone-step-num{animation:none!important}
  .pop{display:none}
}
@media(max-width:1100px) and (min-width:901px){
  .hero{column-gap:28px}
  .phone-flow{gap:16px}
  .phone-flow-device{width:212px;height:432px;padding:9px;border-radius:38px}
  .phone-screen{border-radius:30px}
  .product-hero{height:124px}
  .phone-flow-steps{flex-basis:150px}
  .phone-flow:before{width:300px;height:300px}
  .phone-orbit{width:330px;height:330px;margin-top:-165px}
  .pop{font-size:11px;padding:6px 10px 6px 6px}.pop-ic{width:22px;height:22px}
  .pop-a{left:-40px;top:80px}.pop-b,.pop-chat.pop-b{left:-34px;top:280px}
}
