/* CH09 無人の事務所で動くAI（写真＋モニター画面のアニメーション） */
.office{margin:0;padding:0}
.office__frame{position:relative;overflow:hidden;border-radius:20px;border:1px solid var(--line);background:#111;aspect-ratio:2000/1338;box-shadow:0 30px 80px rgba(0,0,0,.45)}
.office__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.office__stage{position:absolute;left:0;top:0;width:2000px;height:1338px;transform-origin:0 0;visibility:hidden;pointer-events:none}
.office__stage.is-ready{visibility:visible}
.office__cap{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin-top:16px;font-size:14px;line-height:1.8;color:#C9C7C0}
.office__cap .mono{font-size:11px;letter-spacing:.2em;color:var(--blue)}
.office__cap small{font-size:11px;color:var(--mute)}
.of-clip{position:absolute;inset:0}
.of-scr{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;font-family:var(--f-ja);backface-visibility:hidden}
.of-scr::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,rgba(255,255,255,.16),rgba(255,255,255,0) 38%,rgba(255,255,255,0) 70%,rgba(255,255,255,.06));pointer-events:none}
.office__stage.is-debug .of-scr{outline:3px solid #f0f;opacity:.75}
.office__stage.is-debug .of-clip{background:rgba(255,0,255,.08)}
/* 停止中はアニメーションを止める */
.office__stage *{animation-play-state:paused!important}
.office__stage.is-run *{animation-play-state:running!important}

/* --- 共通 --- */
.of-bars{display:flex;align-items:flex-end;gap:6%}
.of-bars i{flex:1;height:var(--h);border-radius:3px 3px 0 0;background:linear-gradient(#4f8bff,#2B6CFF);transform-origin:bottom;animation:of-bar 3.6s var(--d) ease-in-out infinite}
@keyframes of-bar{0%,100%{transform:scaleY(.35)}45%{transform:scaleY(1)}70%{transform:scaleY(.8)}}

.of-code{background:#0f1420;font-family:var(--f-mono);overflow:hidden;position:relative}
.of-code--full{position:absolute;inset:0;padding:10px 12px;border-top:14px solid #1b2131}
.of-code__roll{animation:of-roll 22s linear infinite}
.of-code--slow .of-code__roll{animation-duration:34s}
.of-code--fast .of-code__roll{animation-duration:15s}
.of-code b{display:flex;align-items:center;gap:6px;height:16px}
.of-code u{width:18px;text-decoration:none;font:400 9px/1 var(--f-mono);color:#4a5268;text-align:right;margin-right:6px;flex:none}
.of-code b i{display:block;height:6px;border-radius:3px;opacity:.85}
@keyframes of-roll{to{transform:translateY(-50%)}}

/* --- dash：売上分析ダッシュボード --- */
.of-dash{position:absolute;inset:0;background:#f5f7fb;padding:22px 26px 22px 60px;display:grid;grid-template-rows:auto auto 1fr 120px auto;gap:14px;color:#1d2a44}
.of-dash__h{margin:0;font-size:20px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.of-dash__h span{font:600 11px var(--f-mono);color:#19a463;animation:of-blink 1.6s steps(2) infinite}
.of-dash__kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.of-dash__kpi p{margin:0;background:#fff;border-radius:8px;padding:8px 10px;font-size:11px;color:#6a7690;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.of-dash__kpi b{display:block;font:800 22px var(--f-en);color:#1d2a44;font-variant-numeric:tabular-nums}
.of-dash__line{width:100%;height:100%;background:#fff;border-radius:8px;overflow:hidden}
.of-dash__line polyline{fill:none;stroke-width:3;vector-effect:non-scaling-stroke}
.of-dash__line .l1{stroke:#2B6CFF}.of-dash__line .l2{stroke:#19a463}
.of-dash__scroll{animation:of-pan 12s linear infinite alternate}
@keyframes of-pan{from{transform:translate(0,10px)}to{transform:translate(-400px,-10px)}}
.of-dash__bars{background:#fff;border-radius:8px;padding:12px 14px 0}
.of-dash__bars i:nth-child(3n){background:linear-gradient(#5fd39a,#19a463)}
.of-dash__rows p{margin:0 0 6px;display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;animation:of-row 6s infinite}
.of-dash__rows p i{height:7px;border-radius:4px;background:#d7dde9}
.of-dash__rows p:nth-child(2){animation-delay:1s}.of-dash__rows p:nth-child(3){animation-delay:2s}.of-dash__rows p:nth-child(4){animation-delay:3s}.of-dash__rows p:nth-child(5){animation-delay:4s}.of-dash__rows p:nth-child(6){animation-delay:5s}
@keyframes of-row{0%,12%{background:rgba(43,108,255,.14)}20%,100%{background:transparent}}
@keyframes of-blink{50%{opacity:.25}}

/* --- agent：AIエージェントの作業リスト＋コード --- */
.of-agent{position:absolute;inset:0;display:grid;grid-template-columns:44% 1fr;background:#151a24;color:#dfe5f2}
.of-agent__l{padding:22px 24px;border-right:1px solid #262d3c}
.of-agent__h{margin:0 0 16px;font:700 20px var(--f-en);display:flex;gap:12px;align-items:center}
.of-agent__h span{font:600 12px var(--f-ja);color:#4ade80;animation:of-blink 1.4s steps(2) infinite}
.of-agent ul{list-style:none;margin:0;padding:0}
.of-agent li{position:relative;padding-left:30px;font-size:15px;line-height:1;height:38px;display:flex;align-items:center;color:#9aa4b8;animation:of-task 12s infinite;animation-delay:calc(var(--i) * 1.6s - 0s)}
.of-agent li::before{content:"";position:absolute;left:0;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;border:2px solid #4b5568;box-sizing:border-box;animation:of-check 12s infinite;animation-delay:inherit}
@keyframes of-task{0%{color:#9aa4b8}6%,88%{color:#eef2fa}96%,100%{color:#9aa4b8}}
@keyframes of-check{0%{background:transparent;border-color:#4b5568}6%,88%{background:#22c55e radial-gradient(circle,#fff 0 2px,transparent 3px);border-color:#22c55e;box-shadow:0 0 10px rgba(34,197,94,.6)}96%,100%{background:transparent;border-color:#4b5568;box-shadow:none}}
.of-agent__bar{margin:18px 0 0;height:10px;border-radius:5px;background:#262d3c;overflow:hidden}
.of-agent__bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#22c55e,#4ade80);transform-origin:left;animation:of-prog 12s linear infinite}
@keyframes of-prog{0%{transform:scaleX(.02)}80%{transform:scaleX(1)}92%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}
.of-agent__r{padding:14px 16px}

/* --- site：ホームページの制作画面 --- */
.of-site{position:absolute;inset:0;background:#eef1f6;padding:14px 16px;display:grid;grid-template-rows:14px 1fr 64px;gap:12px}
.of-site__nav{margin:0;display:flex;gap:10px;justify-content:flex-end}
.of-site__nav i{width:34px;height:8px;border-radius:4px;background:#c4ccda}
.of-site__nav i:first-child{margin-right:auto;width:60px;background:#2B6CFF}
.of-site__hero{position:relative;border-radius:8px;overflow:hidden}
.of-site__hero span{position:absolute;inset:0;opacity:0;animation:of-fade 12s infinite}
.of-site__hero .s1{background:linear-gradient(160deg,#a8d8c0 0 40%,#5b9a7a 40% 60%,#2f5d4a 60%);animation-delay:0s}
.of-site__hero .s2{background:linear-gradient(200deg,#ffd9a8,#f39a5b 55%,#b65a2e);animation-delay:4s}
.of-site__hero .s3{background:radial-gradient(circle at 70% 40%,#ffffff 0 12%,transparent 13%),linear-gradient(#9ec5ff,#4f7fd9);animation-delay:8s}
.of-site__hero p{position:absolute;left:16px;bottom:16px;margin:0;display:grid;gap:8px}
.of-site__hero p i{display:block;height:12px;width:150px;border-radius:6px;background:rgba(255,255,255,.92)}
.of-site__hero p i+i{width:100px;height:8px}
@keyframes of-fade{0%{opacity:0}4%,33%{opacity:1}37%,100%{opacity:0}}
.of-site__th{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.of-site__th i{border-radius:6px;background:#d3dae6;animation:of-sel 8s infinite}
.of-site__th i:nth-child(2){animation-delay:2s}.of-site__th i:nth-child(3){animation-delay:4s}.of-site__th i:nth-child(4){animation-delay:6s}
@keyframes of-sel{0%,20%{background:#2B6CFF;box-shadow:0 0 0 2px #2B6CFF}26%,100%{background:#d3dae6;box-shadow:none}}

/* --- stats：解析 --- */
.of-stats{position:absolute;inset:0;background:#f7f8fb;padding:20px;display:grid;grid-template-columns:1fr 104px;grid-template-rows:1fr auto 40px;gap:10px 16px}
.of-stats__bars{grid-row:1;grid-column:1}
.of-stats__donut{grid-row:1;grid-column:2;width:104px;align-self:center;transform:rotate(-90deg);animation:of-spin 16s linear infinite}
.of-stats__donut circle{fill:none;stroke-width:7}
.of-stats__donut .t{stroke:#e3e7ef}
.of-stats__donut .a{stroke:#2B6CFF;stroke-dasharray:62 38;animation:of-donut 6s ease-in-out infinite alternate}
.of-stats__donut .b{stroke:#19a463;stroke-dasharray:22 78;stroke-dashoffset:-64}
@keyframes of-donut{to{stroke-dasharray:48 52}}
@keyframes of-spin{to{transform:rotate(270deg)}}
.of-stats__cap{grid-column:1/3;margin:0;font-size:12px;color:#6a7690;font-weight:700}
.of-stats__spark{grid-column:1/3;width:100%;height:40px}
.of-stats__spark polyline{fill:none;stroke:#2B6CFF;stroke-width:2;vector-effect:non-scaling-stroke;stroke-dasharray:300;stroke-dashoffset:300;animation:of-draw 5s ease-out infinite}
@keyframes of-draw{70%,100%{stroke-dashoffset:0}}

/* --- code3：コード＋チェック結果 --- */
.of-split{position:absolute;inset:0;display:grid;grid-template-columns:62% 1fr}
.of-split .of-code--full{position:relative}
.of-term{background:#0a0d14;border-left:1px solid #222a3a;padding:20px 10px;font:500 11px/1.9 var(--f-mono);color:#9aa4b8}
.of-term p{margin:0;white-space:nowrap;opacity:0;animation:of-line 10s infinite}
.of-term p:nth-child(1){animation-delay:0s}.of-term p:nth-child(2){animation-delay:1.2s}.of-term p:nth-child(3){animation-delay:2.4s}.of-term p:nth-child(4){animation-delay:3.6s}.of-term p:nth-child(5){animation-delay:4.8s}
.of-term .ok{color:#4ade80}
.of-term .cur{opacity:1;animation:of-blink 1s steps(2) infinite}
@keyframes of-line{0%{opacity:0}3%,85%{opacity:1}92%,100%{opacity:0}}

/* --- hero：ホームページのトップ（スライド切替） --- */
.of-hero{position:absolute;inset:0;background:#fff}
.of-hero__nav{position:absolute;left:0;right:0;top:0;height:34px;margin:0;padding:0 16px;display:flex;align-items:center;gap:12px;background:#fff;z-index:2;box-shadow:0 1px 0 #e6e9ef}
.of-hero__nav b{width:70px;height:12px;border-radius:6px;background:#1d2a44;margin-right:auto}
.of-hero__nav i{width:36px;height:7px;border-radius:4px;background:#c7cfdc}
.of-hero__nav em{width:58px;height:18px;border-radius:9px;background:#2B6CFF}
.of-hero__slides{position:absolute;inset:34px 0 0}
.of-hero__slides span{position:absolute;inset:0;opacity:0;animation:of-fade 15s infinite}
.of-hero__slides .h1{background:linear-gradient(transparent 62%,#7b8fa8 62% 66%,transparent 66%),linear-gradient(90deg,#c6d6ea,#f2e2cf);animation-delay:0s}
.of-hero__slides .h2{background:radial-gradient(ellipse at 30% 110%,#5f9a6e 0 35%,transparent 36%),radial-gradient(ellipse at 80% 115%,#4c8360 0 40%,transparent 41%),linear-gradient(#bfe0f5,#eaf6ff);animation-delay:5s}
.of-hero__slides .h3{background:linear-gradient(120deg,#22304d,#3b5998 60%,#7aa2ff);animation-delay:10s}
.of-hero__copy{position:absolute;left:28px;top:84px;display:grid;gap:10px;z-index:2}
.of-hero__copy i{display:block;width:210px;height:18px;border-radius:9px;background:rgba(29,42,68,.85)}
.of-hero__copy i+i{width:150px;height:10px;background:rgba(29,42,68,.55)}
.of-hero__copy em{display:block;width:96px;height:26px;border-radius:13px;background:#FF6A1F;margin-top:8px;animation:of-pulse 2.4s ease-in-out infinite}
@keyframes of-pulse{50%{box-shadow:0 0 0 8px rgba(255,106,31,.2)}}
.of-hero__cursor{position:absolute;margin:0;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:16px solid #111;transform:rotate(-25deg);z-index:3;left:300px;top:200px;animation:of-cursor 9s ease-in-out infinite}
@keyframes of-cursor{0%{left:330px;top:210px}30%{left:80px;top:160px}40%{left:80px;top:160px}70%{left:380px;top:44px}100%{left:330px;top:210px}}

@media (prefers-reduced-motion:reduce){.office__stage *{animation:none!important}}
