/* カメラワーク・ショットの大きさ・アングルの図解（ツールと記事「カメラワーク22種類」で共通） */
.cam-diagram { margin-top: 14px; max-width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cam-diagram[hidden] { display: none; }
.cam-diagram figure { margin: 0; padding: 8px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px; }
.cam-diagram svg { display: block; width: 100%; height: auto; }
.cam-diagram figcaption { margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.cam-diagram .cd-note { grid-column: 1 / -1; margin: 0; font-size: 0.85rem; font-weight: 500; line-height: 1.6; }
.cam-diagram.cd-flip .cd-flipable { transform: scaleX(-1); transform-box: view-box; transform-origin: 80px 0; }
.cam-diagram.cd-rev * { animation-direction: reverse !important; }
.cam-diagram.cd-rev .cd-arrow { marker-end: none; marker-start: url(#cd-ah); } /* 逆向きの動きは矢印も逆に */
.cd-cam { fill: var(--sub); }
.cd-cone { fill: rgba(245, 213, 71, 0.2); }
.cd-subj { fill: var(--text); }
.cd-obj { fill: var(--muted); opacity: 0.45; }
.cd-ground { stroke: var(--border-strong); stroke-width: 1.5; }
.cd-path { fill: none; stroke: var(--border-strong); stroke-dasharray: 3 3; }
.cd-arrow { fill: none; stroke: var(--sub); stroke-width: 1.5; stroke-dasharray: 4 3; }
.cd-ah { fill: var(--sub); }
.cd-sky { fill: #1C2333; }
.cd-far { fill: #2B3550; }
.cd-near { fill: #3A4560; }
.cd-land { fill: #232A3B; }
.cd-rec { fill: #FF5A5A; }
.cd-rec-text { fill: var(--muted); font: 600 6px var(--latin); }
.cd-fg { fill: #B8954A; }
.cd-wall { fill: #0E121B; }
.cd-eye { fill: #131823; }
.cd-dim { fill: rgba(0, 0, 0, 0.55); }
.cd-crop { fill: none; stroke: var(--sub); stroke-width: 1.5; }
.cd-arm { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; }
.cd-ots { fill: #2E3546; }
.cd-table { fill: #3B3127; }
.cd-bowl { fill: #15151B; stroke: #D9C9A8; stroke-width: 1.2; }
.cd-soup { fill: #C98A4A; }
.cd-nori { fill: #1F2A22; }
.cd-green { fill: #4C7A3E; }
.cd-pork { fill: #E3CDB0; }
.cd-egg { fill: #F1EDE4; }
.cd-yolk { fill: #F0B43A; }
/* 動く部品（カメラの図は、置いた位置を中心に動かす） */
.cam-diagram [class^="cd-a-"] { transform-origin: 0 0; animation: 3.4s ease-in-out infinite; }
.cd-a-pan { animation-name: cd-pan !important; }
.cd-a-tilt { animation-name: cd-tilt !important; }
.cd-a-push { animation-name: cd-push !important; }
.cd-a-pull { animation-name: cd-pull !important; }
.cd-a-dolly { animation-name: cd-dolly !important; }
.cd-a-track { animation-name: cd-track !important; }
.cd-a-orbit { animation-name: cd-orbit !important; }
.cd-a-crane { animation-name: cd-crane !important; }
.cd-a-follow { animation-name: cd-follow !important; }
.cd-a-zoom { animation-name: cd-zoom !important; }
.cd-a-shake { animation: cd-shake 0.9s linear infinite !important; }
.cd-a-glide { animation-name: cd-glide !important; }
.cd-a-drone { animation-name: cd-drone !important; }
.cd-a-fpv { animation-name: cd-fpv !important; }
.cd-a-whip { animation-name: cd-whip !important; }
.cd-a-focus { animation-name: cd-focus !important; }
.cd-a-dzoom { animation-name: cd-dzoom !important; }
.cd-a-dzoom-cone { animation-name: cd-dzoom-cone !important; }
.cd-a-bob { animation: cd-bob 0.9s ease-in-out infinite !important; }
.cd-a-crash { animation-name: cd-crash !important; }
.cd-a-window { animation-name: cd-window !important; }
@keyframes cd-pan { 0%, 12% { transform: rotate(-35deg); } 80%, 100% { transform: rotate(35deg); } }
@keyframes cd-tilt { 0%, 12% { transform: rotate(12deg); } 80%, 100% { transform: rotate(-42deg); } }
@keyframes cd-push { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(55px); } }
@keyframes cd-pull { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(-55px); } }
@keyframes cd-dolly { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(-42px); } }
@keyframes cd-track { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(-70px); } }
@keyframes cd-orbit { 0%, 12% { transform: rotate(-60deg); } 80%, 100% { transform: rotate(60deg); } }
@keyframes cd-crane { 0%, 12% { transform: translateY(0) rotate(0); } 80%, 100% { transform: translateY(-52px) rotate(32deg); } }
@keyframes cd-follow { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(48px); } }
@keyframes cd-zoom { 0%, 12% { transform: scaleY(1); } 80%, 100% { transform: scaleY(0.35); } }
@keyframes cd-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(1.5px, -1px) rotate(1.5deg); }
  40% { transform: translate(-1px, 1px) rotate(-1deg); }
  60% { transform: translate(1px, 1.5px) rotate(0.8deg); }
  80% { transform: translate(-1.5px, -0.5px) rotate(-1.5deg); }
}
@keyframes cd-glide { 0%, 12% { transform: translate(0, 0); } 46% { transform: translate(30px, -6px); } 80%, 100% { transform: translate(60px, 0); } }
@keyframes cd-drone { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(80px); } }
@keyframes cd-fpv { 0%, 12% { transform: translate(0, 0) rotate(10deg); } 80%, 100% { transform: translate(80px, 50px) rotate(65deg); } }
@keyframes cd-whip { 0%, 40% { transform: rotate(-55deg); } 52%, 100% { transform: rotate(55deg); } }
@keyframes cd-focus { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(64px); } }
@keyframes cd-dzoom { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(-50px); } }
@keyframes cd-dzoom-cone { 0%, 12% { transform: scaleX(1); } 80%, 100% { transform: scaleX(2); } }
@keyframes cd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes cd-crash { 0%, 40% { transform: scaleY(1); } 50%, 100% { transform: scaleY(0.3); } }
@keyframes cd-window { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(96px); } }
/* 映る画面 */
.cam-diagram [class^="cd-f-"] { transform-box: view-box; animation: 3.4s ease-in-out infinite; }
.cd-f-sway { animation-name: cd-f-sway !important; }
.cd-f-pan { animation-name: cd-f-pan !important; }
.cd-f-tilt { animation-name: cd-f-tilt !important; }
.cd-f-push { transform-origin: 80px 52px; animation-name: cd-f-push !important; }
.cd-f-pull { transform-origin: 80px 52px; animation-name: cd-f-pull !important; }
.cd-f-walkbg { transform-origin: 80px 68px; animation-name: cd-f-walkbg !important; }
.cd-f-bob { animation: cd-bob 0.9s ease-in-out infinite !important; }
.cd-f-trk-far { animation-name: cd-f-trk-far !important; }
.cd-f-trk-near { animation-name: cd-f-trk-near !important; }
.cd-f-trk-subj { animation-name: cd-f-trk-subj !important; }
.cd-f-orbit-far { animation-name: cd-f-orbit-far !important; }
.cd-f-orbit-near { animation-name: cd-f-orbit-near !important; }
.cd-f-crane-bg { animation-name: cd-f-crane-bg !important; }
.cd-f-crane-subj { transform-origin: 80px 72px; animation-name: cd-f-crane-subj !important; }
.cd-f-follow-far { animation-name: cd-f-follow-far !important; }
.cd-f-follow-near { animation-name: cd-f-follow-near !important; }
.cd-f-low-near { animation-name: cd-f-low-near !important; }
.cd-f-shake { transform-origin: 80px 45px; animation: cd-shake 0.9s linear infinite !important; }
.cd-f-glide { transform-origin: 80px 52px; animation-name: cd-f-glide !important; }
.cd-f-drone { transform-origin: 80px 60px; animation-name: cd-f-drone !important; }
.cd-f-fpv { transform-origin: 80px 72px; animation-name: cd-f-fpv !important; }
.cd-f-whip { animation-name: cd-f-whip !important; }
.cd-f-rf-near { animation-name: cd-f-rf-near !important; }
.cd-f-rf-far { animation-name: cd-f-rf-far !important; }
.cd-f-dzoom { transform-origin: 80px 68px; animation-name: cd-f-dzoom !important; }
.cd-f-crash { transform-origin: 80px 50px; animation-name: cd-f-crash !important; }
.cd-f-win { transform-origin: 80px 48px; animation-name: cd-f-win !important; }
.cd-f-win-bg { transform-origin: 80px 48px; animation-name: cd-f-win-bg !important; }
@keyframes cd-f-sway { 0%, 100% { transform: translateX(-8px); } 50% { transform: translateX(8px); } }
@keyframes cd-f-pan { 0%, 12% { transform: translateX(40px); } 80%, 100% { transform: translateX(-40px); } }
@keyframes cd-f-tilt { 0%, 12% { transform: translateY(-6px); } 80%, 100% { transform: translateY(42px); } }
@keyframes cd-f-push { 0%, 12% { transform: scale(1); } 80%, 100% { transform: scale(1.8); } }
@keyframes cd-f-pull { 0%, 12% { transform: scale(1.8); } 80%, 100% { transform: scale(1); } }
@keyframes cd-f-walkbg { 0%, 12% { transform: scale(1.3); } 80%, 100% { transform: scale(1); } }
@keyframes cd-f-trk-far { 0%, 12% { transform: translateX(-10px); } 80%, 100% { transform: translateX(10px); } }
@keyframes cd-f-trk-near { 0%, 12% { transform: translateX(-40px); } 80%, 100% { transform: translateX(40px); } }
@keyframes cd-f-trk-subj { 0%, 12% { transform: translateX(-30px); } 80%, 100% { transform: translateX(30px); } }
@keyframes cd-f-orbit-far { 0%, 12% { transform: translateX(12px); } 80%, 100% { transform: translateX(-12px); } }
@keyframes cd-f-orbit-near { 0%, 12% { transform: translateX(38px); } 80%, 100% { transform: translateX(-38px); } }
@keyframes cd-f-crane-bg { 0%, 12% { transform: translateY(0); } 80%, 100% { transform: translateY(-26px); } }
@keyframes cd-f-crane-subj { 0%, 12% { transform: scale(1); } 80%, 100% { transform: scale(0.85); } }
@keyframes cd-f-follow-far { 0%, 12% { transform: translateX(10px); } 80%, 100% { transform: translateX(-10px); } }
@keyframes cd-f-follow-near { 0%, 12% { transform: translateX(40px); } 80%, 100% { transform: translateX(-40px); } }
@keyframes cd-f-low-near { 0%, 12% { transform: translateX(70px); } 80%, 100% { transform: translateX(-70px); } }
@keyframes cd-f-glide { 0%, 12% { transform: translateX(0) scale(1); } 80%, 100% { transform: translateX(-6px) scale(1.3); } }
@keyframes cd-f-drone { 0%, 12% { transform: scale(1); } 80%, 100% { transform: scale(1.5); } }
@keyframes cd-f-fpv { 0%, 12% { transform: rotate(-8deg) scale(1); } 80%, 100% { transform: rotate(6deg) scale(2.6); } }
@keyframes cd-f-whip { 0%, 40% { transform: translateX(70px); filter: blur(0); } 46% { filter: blur(3px); } 52%, 100% { transform: translateX(-70px); filter: blur(0); } }
@keyframes cd-f-rf-near { 0%, 12% { filter: blur(0); } 80%, 100% { filter: blur(2.5px); } }
@keyframes cd-f-rf-far { 0%, 12% { filter: blur(2.5px); } 80%, 100% { filter: blur(0); } }
@keyframes cd-f-dzoom { 0%, 12% { transform: scale(1); } 80%, 100% { transform: scale(1.7); } }
@keyframes cd-f-crash { 0%, 40% { transform: scale(1); } 50%, 100% { transform: scale(2.6); } }
@keyframes cd-f-win { 0%, 12% { transform: scale(1); } 80%, 100% { transform: scale(7); } }
@keyframes cd-f-win-bg { 0%, 12% { transform: scale(1.3); } 80%, 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .cam-diagram [class^="cd-a-"], .cam-diagram [class^="cd-f-"] { animation: none !important; }
}
