/* v63 AI導入支援のファーストビュー：届いた仕事をAIが受け取り、下書きにして、人が確認するまでの流れ */
.ai-stage{--st-accent:#50dfec;--st-soft:#b8f3f6;--st-paper:#e8f3f5;--st-ink:#13303b;--st-glass:#0f232c;--st-line:#5fb9c855}
.ai-stage .lab-tilt{transform-style:flat}
.ai-stage .st-glow{position:absolute;left:150px;top:40px;width:320px;height:320px;border-radius:50%;background:radial-gradient(circle,#50dfec2e,transparent 65%);filter:blur(6px);pointer-events:none}
.ai-stage .st-wires{position:absolute;inset:0;width:620px;height:445px;overflow:visible;pointer-events:none}
.ai-stage .st-wire{fill:none;stroke:var(--st-line);stroke-width:1.5;stroke-dasharray:4 7}
.ai-stage .st-dot{position:absolute;left:0;top:0;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:var(--st-accent);box-shadow:0 0 12px var(--st-accent);opacity:0;pointer-events:none}

.ai-stage .st-inbox{position:absolute;left:0;top:44px;width:215px;height:300px}
.ai-stage .st-inbox-label,.ai-stage .st-meter>p{margin:0;color:#8fb8c4;font-size:15px;letter-spacing:.06em}
.ai-stage .st-slip{position:absolute;left:4px;width:198px;padding:11px 14px 12px;border-radius:6px 14px 6px 6px;background:var(--st-paper);color:var(--st-ink);box-shadow:0 14px 26px #0008,0 1px 0 #fff inset;opacity:0}
.ai-stage .st-slip:nth-of-type(1){top:30px}.ai-stage .st-slip:nth-of-type(2){top:118px}.ai-stage .st-slip:nth-of-type(3){top:206px}
.ai-stage .st-slip small{display:inline-block;margin-bottom:5px;padding:2px 9px;border-radius:20px;background:#13303b;color:#bff4f8;font-size:13px;letter-spacing:.04em}
.ai-stage .st-slip span{display:block;font-size:16px;line-height:1.45;font-weight:600;word-break:auto-phrase}
.ai-stage .st-slip:nth-of-type(2){background:#fff3cf}

.ai-stage .st-core{position:absolute;left:245px;top:140px;width:130px;height:130px}
.ai-stage .st-ring{position:absolute;inset:-26px;border:1px solid #50dfec66;border-radius:50%;border-top-color:var(--st-accent);border-right-color:transparent}
.ai-stage .st-ring-two{inset:-46px;border-color:#50dfec30;border-bottom-color:#b8f3f6aa;border-left-color:transparent}
.ai-stage .st-face{position:absolute;inset:0;border-radius:32px;background:linear-gradient(150deg,#1d4a57,#0c1f27 70%);border:1px solid #8fe9f299;box-shadow:0 0 0 6px #50dfec12,0 20px 45px #000a,inset 0 1px 0 #ffffff40;display:grid;place-items:center;align-content:center;gap:6px}
.ai-stage .st-face b{font-size:30px;line-height:1;letter-spacing:.02em;color:#effdff;font-weight:600}
.ai-stage .st-eyes{display:flex;gap:18px;height:16px;align-items:center;transition:transform .25s ease-out}
.ai-stage .st-eye{display:block;width:11px;height:14px;border-radius:50%;background:var(--st-soft);box-shadow:0 0 10px var(--st-accent);transform-origin:center}
.ai-stage[data-face=happy] .st-eye{height:7px;border-radius:12px 12px 0 0;background:transparent;border:3px solid var(--st-soft);border-bottom:0;box-shadow:none}
.ai-stage .st-bubble{position:absolute;left:50%;top:-58px;margin:0;padding:6px 12px;border-radius:14px;background:#effdff;color:var(--st-ink);font-size:13px;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:3px;transform:translateX(-50%) scale(0);transform-origin:50% 120%}
.ai-stage .st-bubble:after{content:'';position:absolute;left:50%;bottom:-6px;margin-left:-6px;border:6px solid transparent;border-bottom:0;border-top-color:#effdff}
.ai-stage .st-bubble i{width:4px;height:4px;border-radius:50%;background:var(--st-ink)}

.ai-stage .st-out{position:absolute;left:396px;top:44px;width:226px;min-height:250px;padding:14px 15px 15px;border-radius:14px;background:linear-gradient(160deg,#143440f2,#0c1d25f7);border:1px solid #6fdbe788;box-shadow:0 24px 50px #000b,0 0 30px #50dfec1f;transform-origin:0 50%;opacity:0}
.ai-stage .st-out-title{margin:0 0 8px;color:var(--st-accent);font-size:13px;font-weight:600;letter-spacing:.06em}
.ai-stage .st-type{margin:0;min-height:96px;color:#effdff;font-size:15px;line-height:1.6;word-break:auto-phrase}
.ai-stage .st-type .ph{display:inline-block}
.ai-stage .st-type.is-typing:after{content:'';display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-2px;background:var(--st-accent);animation:st-caret .8s steps(1) infinite}
@keyframes st-caret{50%{opacity:0}}
.ai-stage .st-bars{display:none;height:46px;align-items:end;gap:10px;margin:8px 0 2px}
.ai-stage[data-mode=data] .st-bars{display:flex}
.ai-stage .st-bars i{flex:1;border-radius:3px 3px 0 0;background:linear-gradient(#50dfec,#2a7d8c);transform-origin:bottom;transform:scaleY(0)}
.ai-stage .st-bars i:nth-child(1){height:55%}.ai-stage .st-bars i:nth-child(2){height:78%}.ai-stage .st-bars i:nth-child(3){height:100%}
.ai-stage .st-tags{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0 0;padding:0;list-style:none}
.ai-stage .st-tags li{padding:3px 9px;border-radius:20px;border:1px solid #6fdbe788;color:#bff4f8;font-size:13px;opacity:0}
.ai-stage .st-stamp{display:flex;align-items:center;gap:7px;margin:12px 0 0;padding:6px 10px;border-radius:8px;background:var(--st-accent);color:#0d2a35;font-size:13px;font-weight:700;opacity:0;transform-origin:20% 50%}
.ai-stage .st-stamp span:first-child{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#0d2a35;color:var(--st-accent);font-size:11px}

.ai-stage .st-meter{position:absolute;left:150px;top:338px;width:320px}
.ai-stage .st-meter-row{display:grid;grid-template-columns:92px 1fr;align-items:center;gap:8px;margin-top:6px;color:#c3dce2;font-size:14px}
.ai-stage .st-meter-bar{display:block;height:8px;border-radius:8px;background:#ffffff1c;position:relative;overflow:hidden}
.ai-stage .st-meter-bar:after{content:'';position:absolute;inset:0;border-radius:inherit;transform-origin:left;transform:scaleX(var(--fill,0))}
.ai-stage .st-meter-hand:after{background:#8fa6ae}
.ai-stage .st-meter-ai:after{background:var(--st-accent);box-shadow:0 0 10px var(--st-accent)}

.ai-stage .st-burst{position:absolute;left:510px;top:280px;width:0;height:0;pointer-events:none}
.ai-stage .st-burst i{position:absolute;width:7px;height:7px;margin:-3px;background:var(--st-soft);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0}

/* 動きなし（動きを減らす設定・止めている時・JSが動く前）は完成した状態を見せる */
.ai-stage[data-static=true] .st-slip,.ai-stage[data-static=true] .st-out,.ai-stage[data-static=true] .st-tags li,.ai-stage[data-static=true] .st-stamp{opacity:1}
.ai-stage[data-static=true] .st-slip:nth-of-type(1){transform:rotate(-5deg)}.ai-stage[data-static=true] .st-slip:nth-of-type(2){transform:rotate(3deg)}.ai-stage[data-static=true] .st-slip:nth-of-type(3){transform:rotate(-2deg)}
.ai-stage[data-static=true] .st-bars i{transform:none}
.ai-stage[data-static=true] .st-meter-hand{--fill:1}.ai-stage[data-static=true] .st-meter-ai{--fill:.28}
@media(max-width:700px){.ai-stage.ai-lab{height:340px}}

/* v67 C案：触ると反応する（紙をつかんでAIへ投げる・AIをつつく） */
.ai-stage button.st-slip{display:block;border:0;font:inherit;text-align:left;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}
.ai-stage[data-phase=intake] .st-slip{touch-action:none}
.ai-stage .st-slip.is-grabbed{cursor:grabbing;z-index:6;box-shadow:0 26px 40px #000a,0 0 0 2px var(--st-accent)}
.ai-stage .st-slip:focus-visible,.ai-stage .st-face:focus-visible{outline:3px solid var(--st-accent);outline-offset:4px}
.ai-stage button.st-face{padding:0;font:inherit;color:inherit;cursor:pointer;transition:box-shadow .3s}
.ai-stage button.st-face:hover{box-shadow:0 0 0 8px #50dfec26,0 0 40px #50dfec55,0 20px 45px #000a,inset 0 1px 0 #ffffff40}
.ai-stage[data-face=excited] .st-eye{transform:scale(1.4);transition:transform .2s}
.ai-stage .st-hint{position:absolute;left:0;top:-38px;width:340px;margin:0;color:var(--st-accent);font-size:15px;font-weight:600;opacity:0;transition:opacity .4s;pointer-events:none}
.ai-stage .st-hint:before{content:'';display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:50%;background:var(--st-accent);box-shadow:0 0 0 0 #50dfec88;animation:st-ping 1.4s infinite}
@keyframes st-ping{70%{box-shadow:0 0 0 10px #50dfec00}100%{box-shadow:0 0 0 0 #50dfec00}}
.ai-stage[data-hint=on] .st-hint{opacity:1}
.ai-stage .st-hint-touch{display:none}
@media(hover:none){.ai-stage .st-hint-pc{display:none}.ai-stage .st-hint-touch{display:inline}}
.ai-stage .st-core{z-index:3}
.ai-stage .st-slip.is-eaten{pointer-events:none;visibility:hidden}
.ai-stage .st-bubble.is-say i{display:none}

/* v71 ドラッグ中に周りの文字が選択されないように */
.ai-stage{-webkit-user-select:none;user-select:none}
.ai-stage .st-slip.is-flying{pointer-events:none;z-index:5}

/* v71 案①「表情ゆたか」：AIに口とほっぺを足し、受け取る・考える・眠る・照れるを表情で見せる */
.ai-stage .x-mouth{display:block;width:16px;height:7px;margin-top:-2px;border:2.5px solid var(--st-soft);border-top:0;border-radius:0 0 12px 12px;transition:width .18s,height .18s,border-radius .18s,background .18s;transform-origin:50% 0}
.ai-stage[data-mouth=o] .x-mouth{width:10px;height:10px;border:2.5px solid var(--st-soft);border-radius:50%}
.ai-stage[data-mouth=open] .x-mouth{width:26px;height:22px;border:3px solid var(--st-soft);border-radius:8px 8px 16px 16px;background:#06141a;box-shadow:inset 0 -6px 0 #e86f8a}
.ai-stage .st-face b{transition:opacity .2s}
.ai-stage[data-mouth=open] .st-face b{opacity:.25}
.ai-stage .x-cheek{position:absolute;top:56px;width:16px;height:8px;border-radius:50%;background:#ff8fb1;filter:blur(1.5px);opacity:0;transition:opacity .3s;pointer-events:none}
.ai-stage .x-cheek-l{left:22px}.ai-stage .x-cheek-r{right:22px}
.ai-stage[data-blush=on] .x-cheek{opacity:.75}
.ai-stage[data-face=wink] .st-eye:first-child{height:7px;border-radius:12px 12px 0 0;background:transparent;border:3px solid var(--st-soft);border-bottom:0;box-shadow:none}
.ai-stage[data-face=sleep] .st-eye{height:3px;border-radius:3px;box-shadow:none}
.ai-stage[data-face=sleep] .st-ring{animation-play-state:paused;opacity:.4}
.ai-stage .x-pop{position:absolute;z-index:7;left:0;top:0;margin:0;color:var(--st-soft);font-weight:700;font-size:22px;line-height:1;pointer-events:none;opacity:0;text-shadow:0 0 12px #50dfec}
.ai-stage .x-z{font-size:18px;color:#bfe9f0}
.ai-stage .x-bang{font-size:34px;color:#fff6c4;text-shadow:0 0 18px #ffe46b}
.ai-stage .x-drop{position:absolute;width:9px;height:12px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:#9ee9ff;opacity:0;pointer-events:none}
.ai-stage .x-crumb{position:absolute;width:6px;height:6px;background:var(--st-paper);border-radius:1px;opacity:0;pointer-events:none}

/* ---- 顔の見た目（data-look）：robo＝まるロボ／mochi＝もち／hikari＝ひかり ---- */
/* 共通：目・口・文字を決まった位置に置く（目の向きは JS が .st-eyes の transform で動かす） */
.ai-stage[data-look] .st-face{display:block;overflow:visible}
.ai-stage[data-look] .st-eyes{position:absolute;left:0;right:0;top:44px;justify-content:center;gap:24px;height:22px;z-index:1}
.ai-stage[data-look] .st-eye{position:relative;width:15px;height:20px}
.ai-stage[data-look] .st-eye:after{content:'';position:absolute;left:3px;top:3px;width:5px;height:5px;border-radius:50%;background:#fff}
.ai-stage[data-look][data-face=happy] .st-eye:after,.ai-stage[data-look][data-face=sleep] .st-eye:after,.ai-stage[data-look][data-face=wink] .st-eye:first-child:after{display:none}
.ai-stage[data-look][data-face=happy] .st-eye,.ai-stage[data-look][data-face=wink] .st-eye:first-child{height:9px;margin-top:4px}
.ai-stage[data-look] .x-mouth{position:absolute;left:0;right:0;top:72px;margin:0 auto;z-index:1}
.ai-stage[data-look][data-mouth=open] .x-mouth{top:68px}
.ai-stage[data-look] .st-face b{position:absolute;left:0;right:0;bottom:12px;font-size:13px;letter-spacing:.12em;text-align:center;font-weight:700}
.ai-stage[data-look][data-mouth=open] .st-face b{opacity:1}
.ai-stage[data-look] .x-cheek{top:68px;width:18px;height:9px;z-index:1}
.ai-stage[data-look] .x-cheek-l{left:24px}.ai-stage[data-look] .x-cheek-r{right:24px}
.ai-stage .x-antenna,.ai-stage .x-ear,.ai-stage .x-twinkle{display:none}
.ai-stage .x-antenna{position:absolute;left:50%;top:-24px;width:4px;height:24px;margin-left:-2px;transform-origin:50% 100%;border-radius:2px}
.ai-stage .x-bulb{position:absolute;left:50%;top:-10px;width:14px;height:14px;margin-left:-7px;border-radius:50%}

/* まるロボ：白いまるい頭に、黒い画面の顔。アンテナと耳つき */
.ai-stage[data-look=robo] .st-face{border-radius:46px 46px 38px 38px;border:0;background:linear-gradient(165deg,#ffffff,#d3f5f8 45%,#93dde8);box-shadow:0 0 0 6px #50dfec1c,0 22px 44px #000b,inset 0 -9px 0 #6fc5d1aa,inset 0 3px 0 #fff}
.ai-stage[data-look=robo] .st-face:before{content:'';position:absolute;left:15px;right:15px;top:24px;height:72px;border-radius:30px;background:radial-gradient(circle at 50% 0,#1d4a57,#0a1d25 70%);box-shadow:inset 0 2px 8px #000c,0 1px 0 #ffffffaa}
.ai-stage[data-look=robo] .st-eye{background:#8ff6ff;box-shadow:0 0 12px #50dfec}
.ai-stage[data-look=robo] .st-face b{color:#2a7d8c}
.ai-stage[data-look=robo] .x-antenna{display:block;background:#bfeef3}
.ai-stage[data-look=robo] .x-bulb{background:radial-gradient(circle at 35% 35%,#fff,#ff9fbd 55%,#e8546f);box-shadow:0 0 12px #ff8fb1}
.ai-stage[data-look=robo] .x-ear{display:block;position:absolute;top:40px;width:12px;height:30px;border-radius:7px;background:linear-gradient(#bfeef3,#7fd3df);box-shadow:inset 0 -3px 0 #5fb9c8}
.ai-stage[data-look=robo] .x-ear-l{left:-9px}.ai-stage[data-look=robo] .x-ear-r{right:-9px}



/* 明るい顔の上では、目の線（にっこり・ウインク・寝る）と口を濃い色に */
/* つついた時のホバーの光は形に合わせる */
.ai-stage[data-look] button.st-face:hover{filter:brightness(1.06)}
.ai-stage[data-look][data-face=sleep] .st-eye{height:4px;margin-top:9px;border-radius:4px}
.ai-stage[data-look][data-face=sleep] .st-eye:after{display:none}

/* 食べる・吐き出すをわかりやすく */
.ai-stage .x-chomp{font-size:24px;color:#fff6c4;text-shadow:0 0 14px #ffd84d,0 2px 0 #0008;letter-spacing:.04em}
.ai-stage[data-puff=on] .x-cheek{opacity:.85;transform:scale(1.5)}
.ai-stage[data-look][data-puff=on] .x-cheek-l{left:16px}.ai-stage[data-look][data-puff=on] .x-cheek-r{right:16px}
.ai-stage .x-cheek{transition:opacity .3s,transform .25s,left .25s,right .25s}
.ai-stage .x-ball{position:absolute;left:0;top:0;width:26px;height:26px;margin:-13px;border-radius:50% 46% 52% 44%;background:radial-gradient(circle at 35% 30%,#ffffff,#e8f3f5 55%,#b9ccd1);box-shadow:0 6px 12px #0009,inset -3px -3px 0 #c9d9dd;opacity:0;pointer-events:none;z-index:6}
.ai-stage .x-ball:before{content:'';position:absolute;inset:5px 4px 6px 6px;border-radius:40% 55% 45% 50%;border-top:1.5px solid #b4c7cc;border-right:1.5px solid #c9d8dc;transform:rotate(-20deg)}
.ai-stage[data-mouth=open] .x-mouth{width:30px;height:26px}
