# 스프링 (Spring)

탄성으로 목표 위치에 안착하는 움직임

## 체험 방법

구가 평형점을 지나 되돌아와 정착하는 모습을 봅니다.

## 적용할 때

버튼·핸들이 잡히고 놓이는 물리적 반응이 필요할 때.

선택 표시가 약한 탄성으로 자리 잡게 해줘.

## 독립 실행 코드

아래 전체 코드를 HTML 파일로 저장해 브라우저에서 엽니다. 오프라인에서 바로 실행할 수 있도록 필요한 자료와 조작 코드를 포함했습니다.

```html
<!doctype html>
<html lang="ko"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>스프링 · Motion Lab</title><style>*{box-sizing:border-box}body{margin:0;background:#f4f3ec;color:#24251f;font:15px/1.5 system-ui,sans-serif}main{width:min(1080px,100%);margin:auto}header.sample-heading,footer.sample-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 16px}.sample-heading h1{margin:0;font-size:clamp(20px,3vw,32px)}.sample-tools p{margin:0;flex:1 1 240px;font-size:13px}.sample-tools button{min-height:42px;padding:6px 12px;border:1px solid #666957;background:#fcfbf4;color:#202219;border-radius:3px;font:inherit}#playDemo{background:#272a23;color:white}#stage{width:100%;height:clamp(310px,70dvh,700px);position:relative;overflow:auto}.sample-status{min-height:1.4em;margin:0 16px 12px;font-size:13px}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #a64c27;outline-offset:2px}[hidden]{display:none!important}@media(prefers-reduced-motion:reduce){*,*::after,*::before{scroll-behavior:auto!important}}
/* Original print-room exhibits. Sizes follow the exhibit area, including standalone players. */
/* Playback geometry must also work when the gallery stylesheet is absent. */
.motion-plate .spring-exhibit .animation-ground,
.motion-plate .tilt-area,
.motion-plate .confetti-area{display:grid;place-items:center}
.motion-plate .motion-label{position:absolute;bottom:5px;left:0;right:0;text-align:center}
.motion-plate .marquee-window{width:100%;overflow:hidden}
.motion-plate .marquee-track{display:flex;width:max-content}
.motion-plate .marquee-group{white-space:nowrap}
.motion-plate .path-area{position:relative}
.motion-plate .path-dot{position:absolute;top:0;left:0}
.motion-plate .custom-pointer{position:absolute;border-radius:50%}
.motion-plate .cursor-area{overflow:hidden;cursor:none}
.motion-plate .story-pin{position:sticky;top:0}
.motion-plate .story-progress{position:absolute}
.motion-plate .horizontal-card{scroll-snap-align:start}
.demo-scene.motion-plate{--stock:#f1e9d7;--type:#262b25;--rule:#b6ae9e;--verm:#b84931;width:100%;height:100%;position:relative;container-type:size;display:grid;place-items:center;isolation:isolate;overflow:hidden;padding:clamp(12px,4%,44px);box-sizing:border-box;background:#e5dfd3;color:var(--type);font:500 14px/1.35 Inter,Pretendard,"Malgun Gothic",system-ui,sans-serif}
.motion-plate *,.motion-plate *:before,.motion-plate *:after{box-sizing:border-box}
.demo-scene.motion-plate{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.motion-plate .plate-hours{min-width:0}
.motion-plate :is(h3,p,figure){margin:0}.motion-plate :is(button,[tabindex]):focus-visible{outline:3px solid #dd632f;outline-offset:3px}
.motion-plate .plate-head{width:100%;text-align:left;margin:0 0 clamp(13px,4cqh,40px)}
.motion-plate .plate-head small,.motion-plate .plate-page-copy small,.motion-plate .shared-copy small{font:600 11px/1.3 system-ui,sans-serif;letter-spacing:.04em;color:inherit}
.motion-plate .plate-head h3{margin:6px 0 0;font:650 clamp(22px,5.5cqw,54px)/1.1 system-ui,sans-serif;letter-spacing:-.065em;color:inherit}
.motion-plate .plate-caption{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font:600 clamp(10px,2.5cqw,13px)/1.4 system-ui,sans-serif}
.motion-plate .plate-caption em{font:400 italic clamp(12px,3cqw,19px)/1.3 Georgia,"Malgun Gothic",serif;letter-spacing:-.045em;color:inherit}
.motion-plate .plate-control{padding:8px 13px;min-height:35px;color:#fff9e9;background:#2a3029;border:1px solid #2a3029;border-radius:2px;font:600 12px/1.3 system-ui;cursor:pointer}
.motion-plate .plate-contact{width:min(88%,480px,calc(85cqh * 1.35));box-shadow:1px 9px 23px #2329212b;padding:clamp(9px,2cqw,18px);background:#f4f0e3;transform:rotate(-2deg)}
.motion-plate .plate-contact .animation-ground{display:block;height:auto;aspect-ratio:3/2;width:100%;overflow:hidden;background:#292a22}
.motion-plate .plate-contact .contact-photo{width:100%;height:100%;display:block;object-fit:cover}
.motion-plate .plate-contact figcaption{padding:9px 0 1px}.motion-plate.mp-25{background:#333a33}
.motion-plate .plate-sleeve{width:min(92%,530px)}.motion-plate.mp-26{background:#d9d8c6}
.motion-plate .sleeve-slot{height:min(55cqh,260px);width:100%;max-width:430px;position:relative;margin:auto;display:block}
.motion-plate .sleeve-record,.motion-plate .record-disc{border-radius:50%;background:repeating-radial-gradient(circle,#272c29 0 2px,#454944 2.5px 3.4px,#292b27 4px 5px);display:grid;place-items:center;border:1px solid #262a25;box-shadow:2px 5px 12px #1c201d66;aspect-ratio:1}
.motion-plate .sleeve-record{position:absolute;right:6%;top:3%;height:94%}
.motion-plate .sleeve-record i,.motion-plate .record-disc i{width:33%;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#1b1a17 0 3%,#c65e42 4% 100%);color:#f7ebd1;font:italic 600 clamp(8px,3cqw,15px) Georgia;text-align:center}
.motion-plate .sleeve-pocket{position:relative;display:block;height:100%;width:auto;aspect-ratio:1;margin-left:5%;background:#d26d4f;box-shadow:3px 3px 7px #1a211c46}
.motion-plate .sleeve-pocket .plate-print{width:100%;height:100%}.motion-plate .sleeve-pocket>span:last-child{position:absolute;bottom:9%;left:8%;padding:3px 6px;font:700 12px/1.2 Georgia;background:#f4dfb7}
.motion-plate .plate-proofsheet{width:min(90%,450px);padding:clamp(15px,3.5cqw,30px);background:#f7f0de;color:#44372d;border:1px solid #c1ae95;box-shadow:3px 6px 0 #bbac91}
.motion-plate .plate-proofsheet .animation-ground{position:relative;height:min(43cqh,175px);border-block:1px solid #b2a086;display:grid;place-items:center;margin:12px 0}
.motion-plate .proof-lines{position:absolute;left:0;right:0;top:16%;bottom:16%;background:repeating-linear-gradient(0deg,transparent 0 14px,#cbc2ad 14px 15px)}
.motion-plate .proof-seal{width:auto;height:min(35cqh,130px);aspect-ratio:1;position:relative;display:grid;place-content:center;gap:0;transform:rotate(-7deg);text-align:center;border:5px double #a63b26;color:#a63b26;background:#f5edda;border-radius:50%}
.motion-plate .proof-seal span{font:700 clamp(23px,8cqh,43px)/1.2 Georgia,serif}.motion-plate .proof-seal small{font-size:11px}
.motion-plate .plate-ledger{width:min(95%,570px);padding:clamp(16px,4cqw,38px);background:#f6f0df;box-shadow:0 7px 22px #45513a1c;border-top:3px solid #555c4d}
.motion-plate .track-row,.motion-plate .duration-row{display:grid;grid-template-columns:minmax(68px,24%) 1fr;align-items:center;gap:12px;border-top:1px solid #cbc7b4;padding:12px 0;margin:0;font:600 clamp(10px,2cqw,13px)/1.4 system-ui;color:#54584c}
.motion-plate .track-row>span,.motion-plate .duration-row>span{width:auto;min-width:0;color:inherit}
.motion-plate .motion-track{position:relative;height:30px;background:repeating-linear-gradient(90deg,#dddcc9 0 10px,#bdbfab 10px 11px);border-radius:0}
.motion-plate .motion-ball{width:30px;height:30px;position:absolute;background:#a55539;color:#fff7e2;font:italic 600 16px/30px Georgia;text-align:center}
.motion-plate .track-row:last-child .motion-ball{background:#526f5b}
.motion-plate .duration-line{width:100%;height:13px;background:#d6d5c6}.motion-plate .duration-fill{height:100%;background:#33382e;transform-origin:left}
.motion-plate .duration-row:nth-last-child(2) .duration-fill{background:#b95235}.motion-plate .duration-row:last-child .duration-fill{background:#497269}
.demo-scene.motion-plate.mp-29,.demo-scene.motion-plate.mp-36{background:#2b382e;color:#f0e9d4}
.motion-plate .spring-exhibit{width:min(88%,520px)}.motion-plate .spring-exhibit .animation-ground{height:min(56cqh,270px);position:relative;border-block:1px solid #7a836e}
.motion-plate .spring-target{position:absolute;left:50%;width:1px;top:4%;bottom:20%;background:repeating-linear-gradient(0deg,transparent 0 4px,#a3ac89 4px 7px);z-index:-1}
.motion-plate .spring-exhibit .moving-shape{display:block;width:min(24cqw,112px);height:auto;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 25%,#f9ab73,#d27a44 40%,#904529 77%,#623725);box-shadow:5px 13px 12px -8px #151c17b0}
.motion-plate .plate-letterpress{width:min(85%,440px);background:#efe7d4;padding:clamp(13px,3cqw,26px);border:1px solid #bdb196}
.motion-plate .bounce-ground{height:min(47cqh,210px);position:relative;width:100%;margin:0 0 8px;border-bottom:3px solid #4d5145}
.motion-plate .bounce-ball{position:absolute;bottom:0;left:calc(50% - 27px);display:grid;place-content:center;width:54px;height:59px;border-radius:2px;box-shadow:inset -4px -3px #333b32,1px 2px 2px #21282044;color:#f3ecd8;background:#5d675a;font:italic 700 47px/1 Georgia}
.motion-plate .plate-turntable{width:min(90%,430px);background:#c0b492;padding:clamp(13px,3cqw,28px);border:1px solid #ac9e80;box-shadow:3px 6px 0 #8f856f}
.motion-plate .disc-bed{position:relative;width:min(64cqw,42cqh,235px);margin:auto}
.motion-plate .record-disc{width:100%;height:auto;margin:0}
.motion-plate .tonearm{position:absolute;right:-8%;top:2%;height:52%;width:6px;background:#605e51;transform-origin:top;transform:rotate(21deg);box-shadow:2px 3px 3px #252a2444}
.motion-plate .tonearm:after{content:"";position:absolute;bottom:-8px;left:-4px;width:13px;height:18px;background:#3f453b}
.motion-plate .plate-readout{margin-top:10px;font-size:12px;letter-spacing:.04em}
.motion-plate .plate-letter,.motion-plate .plate-poem{width:min(91%,530px);padding:clamp(16px,4cqw,45px);background:#f8f0db;box-shadow:2px 5px 15px #37352724;color:#333b31}
.motion-plate .plate-letter{border-left:6px solid #a25b3f}.motion-plate .type-text{min-height:2.6em;margin:clamp(13px,5cqh,40px) 0;font:550 clamp(23px,5.7cqw,42px)/1.35 Georgia,"Batang",serif!important}
.motion-plate .letter-address{padding-top:10px;border-top:1px solid #bdb59e;font-size:12px}.motion-plate .plate-signal{width:min(92%,580px);padding:clamp(18px,4cqw,42px);background:#303b32;color:#f7f0de;box-shadow:3px 4px 0 #182119}
.motion-plate .scramble-text{margin:clamp(12px,4cqh,30px) 0;padding:.5em .16em;background:#242a24;border-block:1px solid #60705f;color:#f5b97f;font:600 clamp(23px,6.5cqw,55px)/1.3 "Courier New",monospace;letter-spacing:0;white-space:nowrap}
.motion-plate .plate-poem{background:#aa4934;color:#fff2d9}.motion-plate .split-words{margin-top:14px;border-top:1px solid #eab9a3;padding:.2em 0 0;display:block;text-align:left;font:550 clamp(30px,8cqw,67px)/1.13 Georgia,"Batang",serif!important}
.motion-plate .split-words span{display:block}.motion-plate .split-words span:nth-child(2){padding-left:12%}.motion-plate .split-words span:nth-child(3){padding-left:24%}
.motion-plate .plate-count{width:min(85%,610px);border-block:1px solid #87927b;text-align:left;padding:clamp(15px,4cqh,32px) 0}.motion-plate .plate-count .counter-number{font:400 clamp(65px,20cqw,150px)/1 Georgia;letter-spacing:-.08em;color:#f5efd9;font-variant-numeric:tabular-nums}.motion-plate .plate-count>div{white-space:nowrap;margin:6px 0}
.motion-plate .plate-count p,.motion-plate .plate-count .mini-label{color:#cad1b9}
.motion-plate .plate-contour{width:min(92%,560px);padding:clamp(14px,3cqw,32px);color:#473f2f;background-color:#f7efd9;background-image:linear-gradient(#ab9b762b 1px,transparent 1px),linear-gradient(90deg,#ab9b762b 1px,transparent 1px);background-size:18px 18px;border:1px solid #beaf93}
.motion-plate .line-svg{width:100%;height:auto;max-height:36cqh;display:block;margin:15px 0}.motion-plate .line-svg path{fill:none;stroke:#9f4728;stroke-width:3;stroke-linecap:round}
.motion-plate .plate-die{width:min(90%,390px);padding:15px 22px;background:#e6decc;border:1px solid #c7b99e}.motion-plate .morph-shape{display:grid;place-content:center;width:min(30cqw,100px);height:min(32cqh,130px);border-radius:3px;margin:auto;color:#f9e8ca;background:#a94930;box-shadow:3px 5px 0 #87795442;transition:background .65s,border-radius .65s,transform .65s}
.motion-plate .morph-shape i{font:normal 34px Georgia,serif}.motion-plate .morph-shape.morphed{border-radius:50% 50% 4px 4px;transform:rotate(-5deg);background:#4b6b55}.motion-plate .die-state{margin:10px 0}
.motion-plate .plate-hours{width:min(96%,660px);background:#304237;color:#f7efd8;padding:clamp(14px,3cqw,28px)}.motion-plate .marquee-window{border-block:1px solid #a4b199;padding:clamp(12px,3cqh,23px) 0;background:#29372e}.motion-plate .marquee-track{position:relative;gap:24px;color:#f3df8d}.motion-plate .marquee-group{display:flex;gap:24px;align-items:center;font:600 clamp(21px,5cqw,40px)/1.2 Georgia,system-ui}.motion-plate .marquee-group i{font-style:normal;color:#cb8058}.motion-plate .plate-hours p{color:#d7e0c8}
.motion-plate .plate-map{width:min(94%,490px);padding:clamp(12px,3cqw,22px);background:#d5e3d6;color:#324f43}.motion-plate .path-area{width:100%;height:min(42cqh,205px);margin:12px 0;border-block:1px solid #91a99a;background:repeating-linear-gradient(90deg,transparent 0 17px,#99b1a044 17px 18px)}.motion-plate .path-area svg{display:block;width:100%;height:100%}.motion-plate .path-area path{fill:none;stroke:#607e6e;stroke-width:2;stroke-dasharray:3 4}.motion-plate .path-dot{width:14px;height:14px;border:2px solid #faf0dd;border-radius:50%;background:#ac5236}
.motion-plate .plate-print{position:relative;isolation:isolate;display:block;overflow:hidden;width:100%;height:100%;background:#d3bea1}.plate-print i,.plate-print b{display:block;position:absolute}
.motion-plate .print-tide{background:#eccca0}.print-tide i{inset:0;background:repeating-radial-gradient(ellipse at 80% 100%,#636f59 0 6%,#b7bd92 6.5% 9%,#6f7c60 9.5% 12%);clip-path:polygon(0 50%,25% 22%,57% 52%,83% 27%,100% 38%,100% 100%,0 100%)}.print-tide b{width:32%;aspect-ratio:1;right:9%;top:8%;background:#ba5c3d;border-radius:50%;z-index:-1}
.motion-plate .print-arc{background:#dd9d72}.print-arc i{width:93%;height:91%;left:17%;top:13%;border-radius:100% 0 0 0;background:repeating-radial-gradient(ellipse at 100% 95%,#a64632 0 5%,#edbd8d 5.5% 6.5%,#9f432f 7% 10%)}.print-arc b{width:38%;height:74%;left:0;top:0;background:#47594e;clip-path:polygon(0 0,100% 0,0 100%)}
.motion-plate .print-fold{background:#dcd4ac}.print-fold i{inset:7% 6%;background:repeating-linear-gradient(116deg,#596a60 0 13%,#79917a 13% 24%,#d5cf9e 24% 36%);clip-path:polygon(0 82%,34% 9%,52% 57%,80% 18%,100% 90%,98% 100%,0 100%)}.print-fold b{height:12%;background:#a55b40;bottom:4%;left:0;right:0}
.motion-plate .print-rings{background:repeating-radial-gradient(ellipse at 26% 68%,#344b49 0 8%,#e0ceb1 8.6% 9.8%,#3b584e 10.2% 14%)}.print-rings i{height:18%;left:0;right:0;bottom:0;background:#b76646}
.motion-plate .plate-page,.motion-plate .plate-shared{width:min(94%,490px);max-width:none;border:0;border-radius:1px;background:#f5edde;box-shadow:0 9px 20px #272d2429}
.motion-plate .plate-page{padding:clamp(12px,3.5cqw,25px)}.motion-plate .page-demo{min-height:0;padding:0;background:transparent;display:grid;grid-template-columns:1fr 1fr;gap:15px;text-align:left;align-items:center}
.motion-plate .plate-proof{aspect-ratio:3/4;width:100%;max-height:36cqh}.motion-plate .plate-page-copy h3{margin:7px 0;font:650 clamp(23px,5.5cqw,39px)/1.1 system-ui}.motion-plate .plate-page-copy p{color:#59594c;font-size:12px}.motion-plate .plate-page .plate-control{margin-top:10px}
.motion-plate .plate-shared{padding:clamp(14px,3.5cqw,30px)}.motion-plate .shared-list{width:100%;display:flex;align-items:center;gap:14px;border:0;background:none;text-align:left;color:inherit;cursor:pointer;padding:0}
.motion-plate .shared-view{height:auto;padding:0}
.motion-plate .shared-art{transition:none}
.motion-plate .shared-art{display:block;width:39%;height:auto;aspect-ratio:4/3;object-fit:cover;transform-origin:0 0;border-radius:0}.motion-plate .shared-copy{display:grid;padding:0;gap:5px}.motion-plate .shared-copy strong{font:650 clamp(24px,5.2cqw,39px)/1.2 system-ui;letter-spacing:-.06em}.motion-plate .shared-note{font:500 12px/1.4 system-ui;color:#655f50}
.motion-plate .shared-view.expanded .shared-list{display:block}.motion-plate .shared-view.expanded .shared-art{width:100%;height:min(42cqh,235px);transform:none}.motion-plate .shared-view.expanded .shared-copy{margin-top:10px;gap:2px}
.motion-plate .story-scroll{width:min(94%,560px);height:min(77cqh,360px);container-type:size;overflow-y:auto;overscroll-behavior:contain;border-radius:0;background:#dad4c1}
.motion-plate .story-long{height:330%;background:#dad4c1}.motion-plate .story-pin{height:100cqh;display:grid;grid-template-columns:1fr 1fr;align-content:center;gap:15px;padding:clamp(12px,4cqw,29px);text-align:left;background:#eee7d5;color:#2e342d}
.motion-plate .story-pin .plate-print{height:min(68cqh,260px);filter:grayscale(1) contrast(1.15)}
.motion-plate .story-pin[data-phase="1"] .plate-print{filter:sepia(.85) saturate(1.4)}.motion-plate .story-pin[data-phase="2"] .plate-print{filter:none}
.motion-plate .story-text{align-self:center}.motion-plate .story-title{font-size:clamp(26px,7cqw,42px)!important;margin:5px 0}.motion-plate .story-copy{font-size:13px}.motion-plate .story-progress{width:82%;height:3px;left:9%;bottom:6%;background:#a34e34;transform-origin:left}
.motion-plate .horizontal-demo{position:relative;display:flex;align-items:stretch;width:min(96%,690px);gap:13px;overflow-x:auto;padding:6px 0 13px;scroll-snap-type:x mandatory;scrollbar-color:#99a08a transparent}
.motion-plate .horizontal-card{flex:0 0 clamp(167px,44cqw,280px);min-width:0;display:grid;grid-template-rows:1fr auto;height:min(58cqh,285px);padding:10px;background:#f3eddf;border-radius:0;box-shadow:1px 3px 7px #35392c20}
.motion-plate .horizontal-card>div{padding-top:8px}
.motion-plate .plate-ink{width:min(88%,430px);text-align:center}.motion-plate .magnet-area{height:min(43cqh,185px);display:grid;place-items:center;border:1px solid #b6af9a;border-radius:0;background:radial-gradient(ellipse at center,#ded9c6,transparent 70%)}
.motion-plate .magnet-button{background:#f5efdd;color:#333a2f;display:flex;align-items:center;gap:10px;padding:11px 16px;border:1px solid #8d8b76;border-radius:2px;font:650 14px/1.4 system-ui;cursor:pointer}.motion-plate .magnet-button i{width:26px;height:26px;border-radius:50%;background:#bd4b32}
.motion-plate .ink-code{padding-top:8px;font:550 12px/1.4 Consolas,monospace;letter-spacing:.06em}
.motion-plate .plate-screen{width:min(94%,530px);height:min(60cqh,300px);display:grid;place-items:end start;padding:15px;position:relative;background:#e2d9c2;color:#33382c;border-radius:0;touch-action:pan-y}
.motion-plate .cursor-halves{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr}.motion-plate .cursor-halves span{padding:10px;font:650 11px/1.2 system-ui}.motion-plate .cursor-halves span+span{background:repeating-radial-gradient(#242a24 0 2px,#424a3d 2.5px 3px);color:#f5eddb}
.motion-plate .plate-screen h3{position:relative;max-width:45%;font-size:clamp(20px,5cqw,38px)}.motion-plate .custom-pointer{display:grid;place-items:center;width:52px;height:52px;color:#27392a;border:2px solid currentColor;backdrop-filter:none;transform:translate(-50%,-50%);font:650 12px/1 Consolas,monospace;pointer-events:none}.motion-plate .custom-pointer.on-ink{color:#f8eed6}
.motion-plate .tilt-area{width:min(90%,430px);height:min(74cqh,360px);perspective:850px}.motion-plate .tilt-card{display:flex;flex-direction:column;align-items:start;justify-content:space-between;text-align:left;padding:clamp(14px,4cqw,29px);height:min(63cqh,275px);width:auto;aspect-ratio:.77;border:1px solid #76856f;border-radius:3px;position:relative;isolation:isolate;overflow:hidden;color:#fff3db;background:repeating-radial-gradient(ellipse at 104% 110%,#324639 0 12px,#81937b 13px 14px,#334d3d 15px 23px);box-shadow:3px 7px 13px #232b2240}
.motion-plate .tilt-card:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(115deg,transparent calc(var(--glint,55%) - 25%),#f7e1b23d var(--glint,55%),transparent calc(var(--glint,55%) + 24%))}
.motion-plate .tilt-card strong{font:italic 550 clamp(30px,7.4cqw,57px)/.93 Georgia;letter-spacing:-.065em}
.motion-plate .confetti-area{width:min(95%,530px);height:min(72cqh,330px);overflow:hidden;position:relative}.motion-plate .admit-ticket{width:84%;position:relative;background:#f4e0af;color:#313728;padding:clamp(14px,4cqw,29px);border:1px solid #c4aa73;box-shadow:4px 6px 0 #ae9c6d70}.motion-plate .admit-ticket h3{font-size:clamp(27px,6.6cqw,48px);margin:15px 0}.motion-plate .ticket-perf{border-top:1px dashed #8d7f53;margin:8px 0 12px}
.motion-plate .ticket-stamp{position:absolute;right:8%;top:41%;border:3px double #a4432d;transform:rotate(-7deg);font:800 clamp(14px,3.8cqw,24px)/1.2 system-ui;color:#a4432d;padding:4px 7px}.motion-plate .ticket-stamp[hidden]{display:none}
.motion-plate .confetti-piece{position:absolute;pointer-events:none;top:46%;left:50%;width:6px;height:12px;border-radius:1px}
.reduced-motion .motion-plate *{transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){.motion-plate *{transition:none!important;scroll-behavior:auto!important}}

.motion-plate .plate-turntable .plate-readout{color:#34382e}
</style></head><body><main><header class="sample-heading"><h1>스프링</h1><span lang="en">Spring</span></header><div id="stage"></div><footer class="sample-tools"><p>구가 평형점을 지나 되돌아와 정착하는 모습을 봅니다.</p><button id="playDemo">스프링 놓기</button><button id="reset">다시 시작</button></footer><p class="sample-status" id="sampleStatus" role="status"></p></main><script>window.MotionFoundationMedia={};</script><script>'use strict';
(() => {
  const photo = 'media/paper-loop.webp';
  const coverArt = (kind) => '<span class="plate-print print-' + kind + '" aria-hidden="true"><i></i><b></b></span>';
  const button = (action, label) => '<button type="button" class="plate-control" data-act="' + action + '">' + label + '</button>';
  const headline = (small, title) => '<header class="plate-head"><small>' + small + '</small><h3>' + title + '</h3></header>';
  const heading = (label, value) => '<div class="plate-caption"><span>' + label + '</span><em>' + value + '</em></div>';
  const pathD = 'M12 111 C46 105 48 48 78 61 S111 100 139 64 S174 19 205 48 S246 97 273 52 S314 34 348 15';
  const frames = [
    ['차광', '빛을 막은 판 위에 밑그림을 올립니다.', 'black'],
    ['노광', '빛이 닿은 면에 무늬가 남습니다.', 'red'],
    ['현상', '잉크가 지나는 자리에 그림이 나타납니다.', 'blue']
  ];
  const titles = ['잔물결','사잇결','겹무늬','여운'];
  const inks = ['산호색','짙은 파랑','솔잎색'];
  const paperPage = (i) => '<div class="plate-proof">' + coverArt(['tide','arc','fold'][i]) + '</div><div class="plate-page-copy"><small>인쇄 견본 ' + String(i+1).padStart(2,'0') + '</small><h3>' + ['첫 물결','낮의 단면','접힌 능선'][i] + '</h3><p>' + ['선 하나를 반복해 만든 수면.','둥근 면을 두 가지 잉크로 나눴습니다.','접힌 종이의 능선을 선으로 옮겼습니다.'][i] + '</p></div>';
  function contents(id, image) {
    switch (id) {
      case 25: return '<figure class="plate-contact"><div class="animation-ground"><img class="moving-shape contact-photo" src="'+image+'" alt="붉은 종이 띠의 겹쳐진 표면"></div><figcaption>' + heading('접촉 인화','종이의 표면') + '</figcaption></figure>';
      case 26: return '<div class="plate-sleeve">' + headline('음반 보관함','회전의 기록') + '<div class="animation-ground sleeve-slot"><div class="moving-shape sleeve-record" role="img" aria-label="보관함에서 나오는 레코드"><i></i></div><div class="sleeve-pocket">' + coverArt('arc') + '<span>33⅓ RPM</span></div></div></div>';
      case 27: return '<div class="plate-proofsheet">' + heading('교정지','최종 판정') + '<div class="animation-ground"><div class="proof-lines" aria-hidden="true"></div><div class="moving-shape proof-seal"><span>校了</span><small>교정 완료</small></div></div>' + heading('인쇄 감리','잉크 · 농도 · 맞춤선') + '</div>';
      case 28: return '<div class="plate-ledger">' + headline('필름 이송 속도','같은 길이의 두 트랙') + ['일정한 속도','끝에서 감속'].map((t,i)=>'<div class="track-row"><span>'+t+'</span><div class="motion-track"><i class="motion-ball">'+(i+1)+'</i></div></div>').join('') + '</div>';
      case 29: return '<div class="scene-center spring-exhibit"><div class="animation-ground"><div class="shape moving-shape" role="img" aria-label="목표선으로 이동하는 구"></div><span class="spring-target" aria-hidden="true"></span><span class="motion-label">평형점</span></div></div>';
      case 30: return '<div class="plate-letterpress">' + headline('납활자 견본','기준선에 닿는 활자') + '<div class="bounce-ground"><span class="bounce-ball">g</span></div>' + heading('로만 소문자','기준선') + '</div>';
      case 31: return '<div class="plate-ledger">' + headline('인쇄 타이밍','세 판의 잉크 도착 시간') + ['검정　600ms','산호　1,600ms','청록　1초 대기'].map(t=>'<div class="duration-row"><span>'+t+'</span><div class="duration-line"><div class="duration-fill"></div></div></div>').join('') + '</div>';
      case 32: return '<div class="scene-center plate-turntable">'+headline('재생 장치','턴테이블')+'<div class="disc-bed"><div class="loop-shape record-disc"><i>SIDE A</i></div><div class="tonearm" aria-hidden="true"></div></div><p class="plate-readout">정지</p></div>';
      case 33: return '<div class="plate-letter">'+heading('작업 서신','보낸 이 · 인쇄실')+'<h3 class="type-text"><span class="text-caret">오늘 첫 인쇄를 마쳤습니다.</span></h3><div class="letter-address">받는 이　기록 보관실</div></div>';
      case 34: return '<div class="plate-signal">'+headline('조판기 상태','활자 식자 확인')+'<div class="scramble-text" aria-label="PLATE READY">PLATE READY</div>'+heading('영문 식자 견본','11자')+'</div>';
      case 35: return '<div class="plate-poem">'+heading('조판 시안','세 행 연작')+'<h3 class="split-words">'+['빛이','종이 위에','머문다'].map(v=>'<span>'+v+'</span>').join('')+'</h3></div>';
      case 36: return '<div class="scene-center plate-count"><span class="mini-label">월간 완료 건수</span><div><strong class="counter-number">1,280</strong><span>건</span></div><p>예시 데이터</p></div>';
      case 37: return '<div class="scene-center plate-contour">'+heading('펜 플로터','능선 습작')+'<svg class="line-svg" viewBox="0 0 360 140" role="img" aria-label="펜으로 그리는 능선"><path d="'+pathD+'" fill="none"/></svg>'+heading('단선 드로잉','종이 위 잉크')+'</div>';
      case 38: return '<div class="scene-center plate-die">'+headline('재단 견본','서표의 모서리')+'<div class="morph-shape"><i>冊</i></div><p class="die-state">각진 모서리</p>'+button('morph','재단선 바꾸기')+'</div>';
      case 39: return '<div class="scene-center plate-hours">'+headline('전시 안내','야간 인쇄실')+'<div class="marquee-window"><div class="marquee-track">'+[0,1].map((_,i)=>'<div class="marquee-group" '+(i?'aria-hidden="true"':'')+'><span>목–일　14:00–21:00</span><i>✳</i><span>마지막 입장　20:30</span><i>✳</i></div>').join('')+'</div><p class="plate-readout">정지</p></div>';
      case 40: return '<div class="plate-map">'+heading('작업실 이송로','원지 → 포장')+'<div class="path-area"><svg viewBox="0 0 360 180" preserveAspectRatio="none" aria-label="창고에서 포장실까지의 곡선"><path d="M22 142 C77 142 49 22 131 49 S227 171 280 95 S319 45 340 39"/></svg><i class="path-dot" aria-hidden="true"></i></div>'+heading('종이 운반차','포장실 도착')+'</div>';
      case 41: return '<div class="mini-window plate-page"><div class="page-demo">'+paperPage(0)+'</div>'+button('page','다음 견본 →')+'</div>';
      case 42: return '<div class="mini-window plate-shared"><div class="shared-view"><button type="button" class="shared-list" aria-expanded="false" data-act="shared"><img src="'+image+'" class="shared-art" alt="돌려 접은 붉은 종이"><span class="shared-copy"><small>조형 기록</small><strong>겹친 면</strong><span class="shared-note">작품 펼치기 ↗</span></span></button></div></div>';
      case 43: return '<div class="story-scroll" tabindex="0" aria-label="인쇄판의 세 단계, 아래로 스크롤"><div class="story-long"><div class="story-pin">'+coverArt('tide')+'<div class="story-text"><small class="story-step">01 / 03</small><h3 class="story-title">차광</h3><p class="story-copy">'+frames[0][1]+'</p></div><div class="story-progress"></div></div></div></div>';
      case 44: return '<div class="horizontal-demo" tabindex="0" aria-label="선과 면 연작 네 점, 좌우로 이동">'+titles.map((t,i)=>'<article class="horizontal-card">'+coverArt(['tide','arc','fold','rings'][i])+'<div>'+heading('연작 0'+(i+1),t)+'</div></article>').join('')+'</div>';
      case 45: return '<div class="plate-ink">'+headline('잉크 스와치','다음 인쇄색')+'<div class="magnet-area"><button type="button" data-act="magnet" class="magnet-button"><i aria-hidden="true"></i><span>산호색</span> ↗</button></div><p class="ink-code">#BD4B32</p></div>';
      case 46: return '<div class="cursor-area plate-screen" tabindex="0" role="group" aria-label="색 분판 탐색. 좌우 방향키 또는 포인터로 이동"><div class="cursor-halves"><span>원지</span><span>먹판</span></div><h3>농도 측정</h3><div class="custom-pointer"><b>0%</b></div></div>';
      case 47: return '<div class="tilt-area"><div class="tilt-card" tabindex="0" role="group" aria-label="전시 패스. 방향키로 기울이기"><small>인쇄실 개방일</small><strong>Press<br>Pass.</strong><small>전시 입장권</small></div></div>';
      case 48: return '<div class="confetti-area"><article class="admit-ticket">'+heading('인쇄실 오픈 스튜디오','ADMIT ONE')+'<h3>입장 확인</h3><span class="ticket-stamp" hidden>입장 완료</span><div class="ticket-perf" aria-hidden="true"></div>'+button('confetti','입장 도장 찍기')+'</article></div>';
    }
  }
  function render(id,root,options={}) {
    if (id < 25 || id > 48) return;
    const image=String(options.paperImage || photo).replaceAll('&','&amp;').replaceAll('"','&quot;').replaceAll('<','&lt;');
    root.innerHTML='<div class="demo-scene motion-plate mp-'+id+'" data-demo="'+id+'">'+contents(id,image)+'</div>';
  }
  const guide = {};
  const labels = [
    ['인화지에 남은 붉은 종이의 사진을 천천히 드러냅니다.','사진이나 새 인쇄 시안을 같은 위치에서 소개할 때.','사진 나타내기'],
    ['레코드가 재킷 옆에서 빠져나옵니다.','카드 뒤에 담긴 부속 콘텐츠를 꺼내 보여줄 때.','레코드 꺼내기'],
    ['작은 인장에서 교정 완료 도장이 커지는 과정을 재생합니다.','확정된 상태나 선택 결과를 강조할 때.','교정 도장 찍기'],
    ['같은 출발점과 도착점에서 일정한 속도와 감속을 비교합니다.','목록 이동과 섹션 전환의 가감속을 정할 때.','두 트랙 비교'],
    ['구가 평형점을 지나 되돌아와 정착하는 모습을 봅니다.','버튼·핸들이 잡히고 놓이는 물리적 반응이 필요할 때.','스프링 놓기'],
    ['활자가 기준선에 떨어져 두 차례 짧게 튄 뒤 멈춥니다.','새로 추가한 항목이 제자리를 찾는 감각을 줄 때.','활자 떨어뜨리기'],
    ['세 잉크의 시작 시각과 도착 시각을 한 번에 비교합니다.','여러 레이어의 등장 시간을 맞출 때.','세 판 재생'],
    ['레코드의 회전을 재생하고 같은 버튼으로 멈춥니다.','진행 중인 상태를 반복 모션으로 표시할 때.','회전 재생'],
    ['서신 한 줄이 글자 단위로 찍힙니다.','작가의 짧은 메시지를 순차적으로 보여줄 때.','서신 타이핑'],
    ['조판기에서 흩어진 활자가 왼쪽부터 지정 문구로 맞춰집니다.','제목의 완성 상태로 시선을 모을 때.','활자 맞추기'],
    ['세 행의 시가 한 구절씩 등장합니다.','짧은 표제나 인용문의 읽는 리듬을 정할 때.','세 행 재생'],
    ['월간 완료 건수가 목표 수치까지 올라갑니다.','요약 지표의 새 값을 보여줄 때.','카운트 재생'],
    ['펜 플로터가 한 줄로 능선을 그립니다.','도면·로고·경로가 형성되는 순서를 보여줄 때.','능선 그리기'],
    ['재단선을 바꿔 각진 서표와 아치형 서표를 비교합니다.','모양 변화로 선택한 옵션을 설명할 때.','재단선 바꾸기'],
    ['전시 개방 시간 안내를 흘려 보고 멈춥니다.','공간이 제한된 전광판에 짧은 안내를 반복할 때.','안내 재생'],
    ['운반차가 인쇄 작업실의 곡선 경로를 따라갑니다.','지도에 이동 경로나 순서가 있는 작업을 보여줄 때.','운반차 출발'],
    ['다음 견본을 눌러 다른 인쇄 작품으로 전환합니다.','작품집 안에서 동급의 페이지 사이를 이동할 때.','다음 견본'],
    ['작품을 누르면 동일한 사진이 작은 목록에서 상세 크기로 이어집니다.','목록에서 선택한 작품과 상세 화면의 관계를 유지할 때.','작품 펼치기'],
    ['아래로 스크롤하거나 다음 단계로 이동해 인쇄판의 변화를 봅니다.','고정한 시각 자료에 설명을 단계적으로 더할 때.','다음 단계'],
    ['연작을 가로로 넘깁니다. 목록 안에서 좌우 방향키도 사용할 수 있습니다.','연속된 작품을 한 줄로 탐색할 때.','다음 작품'],
    ['잉크 스와치 주변에서 포인터를 움직이거나 버튼을 눌러 다음 색을 봅니다.','작은 버튼에 접근 중인 포인터를 유도할 때.','다음 인쇄색'],
    ['원지와 먹판 위에서 포인터를 옮깁니다. 방향키로도 농도를 확인할 수 있습니다.','보는 영역에 따라 커서가 도구 상태를 전달할 때.','다른 면 측정'],
    ['패스 위에서 포인터나 방향키로 보는 각도를 바꿉니다.','카드 표면의 재질과 깊이를 짧게 살펴볼 때.','패스 기울이기'],
    ['입장 도장을 찍으면 완료 상태가 남고 색종이가 흩어집니다.','가입·신청처럼 분명한 완료 순간을 알릴 때.','입장 도장 찍기']
  ];
  for (let i=0;i<labels.length;i++) {
    const [instruction,use,action]=labels[i];
    guide[i+25]={instruction,use,action};
  }
  guide[36].spec='첫 화면과 ‘다시 시작’에서는 1,280건을 표시합니다. 재생을 누르면 0에서 출발해 1.6초 동안 처음에는 빠르게, 끝에서는 천천히 올라갑니다. 값은 정수로 반올림하고 세 자리마다 쉼표를 넣습니다. 숫자는 Georgia 서체로 65~150px 범위에서 화면에 맞추고 단위 ‘건’은 같은 줄에 둡니다. 재생 도중에도 다시 시작할 수 있고 동작 줄이기에서는 최종값을 바로 표시합니다.';
  function player(id,root,{reduced=false,status=()=>{},playButton}={}) {
    if (id<25 || id>48) return;
    const frame=root.querySelector('.motion-plate'), q=s=>frame.querySelector(s), qa=s=>[...frame.querySelectorAll(s)];
    const touchProfile=()=>['ios','android'].includes(frame.ownerDocument.documentElement.dataset.motionPlatform);
    const abort=new AbortController(), animations=new Set(), timers=new Set();
    let turn=0,loop=null,disposed=false,px=.26,py=.49,morph=false;
    const playTrigger=playButton || root.ownerDocument.getElementById('playDemo');
    const on=(el,event,fn,opts={})=>el.addEventListener(event,fn,{...opts,signal:abort.signal});
    const setLabel=text=>{if(playTrigger)playTrigger.textContent=text;};
    const resetTimers=()=>{timers.forEach(clearTimeout);timers.clear();};
    function later(fn,ms){const timer=setTimeout(()=>{timers.delete(timer);if(!disposed)fn();},ms);timers.add(timer);}
    function motion(el,keyframes,options={}) {
      if (reduced) return;
      const a=el.animate(keyframes,{duration:650,easing:'cubic-bezier(.2,.72,.22,1)',...options});
      animations.add(a);
      a.addEventListener('remove',()=>animations.delete(a),{once:true});
      return a;
    }
    const cancelAnimations=()=>{animations.forEach(a=>a.cancel());animations.clear();};
    function revealText(scramble) {
      const el=q(scramble?'.scramble-text':'.text-caret');
      const target=scramble?'PLATE READY':'오늘 첫 인쇄를 마쳤습니다.';
      if(reduced){el.textContent=target;return;}
      const blocks='ABEFGKLMWX';
      const letters=[...target];
      let step=0;
      function tick(){
        const settled=scramble?Math.floor(step/3):step;
        el.textContent=scramble?letters.map((c,i)=>i<settled||c===' '?c:blocks[(i+step)%blocks.length]).join(''):letters.slice(0,settled).join('');
        if(settled<letters.length){step++;later(tick,scramble?35:65);}
      }
      tick();
    }
    function count() {
      const el=q('.counter-number');
      if(reduced){el.textContent='1,280';return}
      const start=performance.now();
      function tick(){const t=Math.min((performance.now()-start)/1600,1);el.textContent=Math.round(1280*(1-(1-t)**3)).toLocaleString('en-US');if(t<1)later(tick,16);}
      tick();
    }
    function repeat(){
      const disc=id===32, el=q(disc?'.loop-shape':'.marquee-track'), readout=q('.plate-readout');
      if(reduced){readout.textContent=disc?'재생 위치를 유지합니다.':'개방 시간 안내를 고정합니다.';status(readout.textContent);return;}
      if(loop?.playState==='running'){loop.pause();readout.textContent='일시 정지';setLabel('계속 재생');return;}
      if(loop)loop.play();
      else {
        const distance=disc?0:q('.marquee-group:nth-child(2)').offsetLeft-q('.marquee-group').offsetLeft;
        loop=motion(el,disc?[{transform:'rotate(0deg)'},{transform:'rotate(360deg)'}]:[{transform:'translateX(0)'},{transform:'translateX(-'+distance+'px)'}],{duration:disc?2800:10500,easing:'linear',iterations:Infinity});
      }
      setLabel('멈추기');readout.textContent='재생 중';
    }
    function cursor(x,y) {
      px=Math.max(.07,Math.min(.93,x));py=Math.max(.10,Math.min(.90,y));
      const p=q('.custom-pointer'), ink=px>.5;
      p.style.left=(px*100)+'%';p.style.top=(py*100)+'%';p.textContent=ink?'92%':'0%';p.classList.toggle('on-ink',ink);
      q('.cursor-area').setAttribute('aria-label','농도 측정 · '+(ink?'먹판 92%':'원지 0%')+' · 방향키로 이동');
    }
    function tilt(x,y) {
      px=Math.max(0,Math.min(1,x));py=Math.max(0,Math.min(1,y));
      const card=q('.tilt-card');
      card.style.setProperty('--glint',(20+px*68)+'%');
      card.style.transform=reduced?'none':'rotateX('+((.5-py)*20)+'deg) rotateY('+((px-.5)*24)+'deg)';
    }
    function scrollToStep(){
      const sc=q('.story-scroll'), max=sc.scrollHeight-sc.clientHeight;
      const n=Math.min(2,Math.floor(sc.scrollTop/Math.max(1,max)*3));
      sc.scrollTo({top:(n+1)%3*max/2,behavior:reduced?'instant':'smooth'});
    }
    function publishScroll(){
      const sc=q('.story-scroll'), p=sc.scrollTop/Math.max(1,sc.scrollHeight-sc.clientHeight), n=Math.min(2,Math.floor(p*3));
      q('.story-pin').dataset.phase=n;
      q('.story-step').textContent='0'+(n+1)+' / 03';q('.story-title').textContent=frames[n][0];q('.story-copy').textContent=frames[n][1];
      q('.story-progress').style.transform='scaleX('+p+')';
    }
    function gallery(direction=1){
      const sc=q('.horizontal-demo'), cards=qa('.horizontal-card');
      const index=cards.reduce((best,el,i)=>Math.abs(el.offsetLeft-cards[0].offsetLeft-sc.scrollLeft)<Math.abs(cards[best].offsetLeft-cards[0].offsetLeft-sc.scrollLeft)?i:best,0);
      const atRight=sc.scrollLeft>=sc.scrollWidth-sc.clientWidth-3;
      const next=direction>0&&atRight?0:direction<0&&index===0?cards.length-1:(index+direction+cards.length)%cards.length;
      sc.scrollTo({left:cards[next].offsetLeft-cards[0].offsetLeft,behavior:reduced?'instant':'smooth'});
    }
    function ticket(){
      const box=q('.confetti-area'), stamp=q('.ticket-stamp');
      stamp.hidden=false;q('[data-act="confetti"]').textContent='도장 다시 찍기';status('입장 도장이 찍혔습니다.');
      qa('.confetti-piece').forEach(el=>el.remove());
      if(reduced)return;
      motion(stamp,[{opacity:0,transform:'rotate(-13deg) scale(1.35)'},{opacity:1,transform:'rotate(-7deg) scale(1)'}],{duration:380});
      for(let i=0;i<28;i++){
        const piece=root.ownerDocument.createElement('i');
        piece.className='confetti-piece';piece.style.background=['#c65039','#507061','#c9943c','#635e7d'][i%4];box.append(piece);
        const theta=i*2.39996, dx=Math.cos(theta)*(40+((i*17)%130)), rise=25+((i*23)%96);
        const a=motion(piece,[{transform:'translate(0,0)',opacity:1},{transform:'translate('+dx+'px,-'+rise+'px) rotate('+i*11+'deg)',opacity:1,offset:.42},{transform:'translate('+dx*1.3+'px,120px) rotate('+i*27+'deg)',opacity:0}],{duration:990+i*8,easing:'ease-out'});
        a.onfinish=()=>piece.remove();
      }
    }
    function play(){
      if(disposed)return;
      if(id===32||id===39){repeat();return;}
      resetTimers();cancelAnimations();
      status(guide[id].action);
      switch(id){
        case 25:motion(q('.moving-shape'),[{opacity:0},{opacity:1}],{duration:1500,easing:'ease-out'});break;
        case 26:motion(q('.moving-shape'),[{transform:'translateX(-68%) rotate(-32deg)'},{transform:'translateX(0) rotate(0deg)'}],{duration:1100});break;
        case 27:motion(q('.moving-shape'),[{transform:'rotate(-7deg) scale(.12)',opacity:.2},{transform:'rotate(-7deg) scale(1)',opacity:1}],{duration:1100});break;
        case 28:qa('.motion-ball').forEach((el,i)=>{const distance=el.parentElement.clientWidth-el.offsetWidth;el.style.transform='translateX('+distance+'px)';motion(el,[{transform:'translateX(0)'},{transform:'translateX('+distance+'px)'}],{duration:1900,easing:i?'cubic-bezier(0,.65,.2,1)':'linear'});});break;
        case 29:motion(q('.moving-shape'),[{transform:'translateX(-125px)'},{transform:'translateX(33px)',offset:.46},{transform:'translateX(-14px)',offset:.66},{transform:'translateX(6px)',offset:.83},{transform:'translateX(0)'}],{duration:1300,easing:'ease-out'});break;
        case 30:motion(q('.bounce-ball'),[{transform:'translateY(-95px)',easing:'ease-in'},{transform:'translateY(0)',offset:.35,easing:'ease-out'},{transform:'translateY(-53px)',offset:.55,easing:'ease-in'},{transform:'translateY(0)',offset:.72,easing:'ease-out'},{transform:'translateY(-14px)',offset:.84,easing:'ease-in'},{transform:'translateY(0)'}],{duration:1350});break;
        case 31:qa('.duration-fill').forEach((el,i)=>motion(el,[{transform:'scaleX(0)'},{transform:'scaleX(1)'}],{duration:i===1?1600:600,delay:i===2?1000:0,fill:'backwards',easing:'linear'}));break;
        case 33:revealText(false);break;
        case 34:revealText(true);break;
        case 35:qa('.split-words span').forEach((el,i)=>motion(el,[{opacity:0,transform:'translateY(.65em) rotate(4deg)'},{opacity:1,transform:'translateY(0)'}],{delay:i*200,duration:750,fill:'backwards'}));break;
        case 36:count();break;
        case 37:{const path=q('.line-svg path'), length=path.getTotalLength();path.style.strokeDasharray=length;motion(path,[{strokeDashoffset:length},{strokeDashoffset:0}],{duration:2200,easing:'ease-in-out'});break;}
        case 38:morph=!morph;q('.morph-shape').classList.toggle('morphed',morph);q('.die-state').textContent=morph?'아치형 모서리':'각진 모서리';break;
        case 40:{const dot=q('.path-dot'),path=q('.path-area path'),length=path.getTotalLength(),size=q('.path-area').getBoundingClientRect();
          const points=Array.from({length:61},(_,i)=>{const p=path.getPointAtLength(i/60*length);return {transform:'translate('+((p.x/360)*size.width-dot.offsetWidth/2)+'px,'+((p.y/180)*size.height-dot.offsetHeight/2)+'px)'};});
          dot.style.transform=points[60].transform;motion(dot,points,{duration:1850,easing:'linear'});break;}
        case 41:turn=(turn+1)%3;q('.page-demo').innerHTML=paperPage(turn);motion(q('.page-demo'),[{opacity:.45,transform:'translateY(18px)'},{opacity:1,transform:'translateY(0)'}],{duration:480});break;
        case 42:{const image=q('.shared-art'),before=image.getBoundingClientRect(),open=q('.shared-view').classList.toggle('expanded');
          q('.shared-list').setAttribute('aria-expanded',String(open));q('.shared-note').textContent=open?'붉은 종이의 단면 · 접기 ↙':'작품 펼치기 ↗';
          const after=image.getBoundingClientRect();
          motion(image,[{transform:'translate('+(before.left-after.left)+'px,'+(before.top-after.top)+'px) scale('+(before.width/after.width)+','+(before.height/after.height)+')'},{transform:'none'}],{duration:600});break;}
        case 43:scrollToStep();break;
        case 44:gallery();break;
        case 45:{
          turn=(turn+1)%3;
          const color=['#BD4B32','#384F6B','#527058'][turn],button=q('.magnet-button');
          button.querySelector('span').textContent=inks[turn];button.querySelector('i').style.background=color;q('.ink-code').textContent=color;
          if(touchProfile())motion(button,[{transform:'scale(.96)'},{transform:'scale(1)'}],{duration:160});
          else motion(button,[{transform:'translateX(0)'},{transform:'translateX(19px)',offset:.45},{transform:'translateX(0)'}],{duration:480});
          break;
        }
        case 46:cursor(px<.5?.77:.24,py);break;
        case 47:tilt(++turn%2?.86:.17,.22);break;
        case 48:ticket();break;
      }
    }
    const inside=q('[data-act]');
    if(inside)on(inside,'click',play);
    if(id===43){on(q('.story-scroll'),'scroll',publishScroll,{passive:true});publishScroll();}
    if(id===44)on(q('.horizontal-demo'),'keydown',e=>{if(['ArrowRight','ArrowLeft'].includes(e.key)){e.preventDefault();gallery(e.key==='ArrowRight'?1:-1)}});
    if([45,46,47].includes(id)){
      const area=q(id===45?'.magnet-area':id===46?'.cursor-area':'.tilt-area');
      function handle(x,y){
        if(id===45){if(!reduced)q('.magnet-button').style.transform='translate('+((x-.5)*32)+'px,'+((y-.5)*27)+'px)';}
        else if(id===46)cursor(x,y);else tilt(x,y);
      }
      const point=e=>{
        if(touchProfile()){
          if(id===45 || (e.type==='pointermove'&&!e.buttons))return;
          if(e.type==='pointerdown'&&e.isPrimary)area.setPointerCapture(e.pointerId);
        }
        const r=area.getBoundingClientRect();
        handle((e.clientX-r.left)/r.width,(e.clientY-r.top)/r.height);
      };
      on(area,'pointermove',point);on(area,'pointerdown',point);
      on(area,'pointerleave',()=>{if(id!==46&&!touchProfile())handle(.5,.5)});
      if(id===47)on(area,'lostpointercapture',()=>{if(touchProfile())tilt(.5,.5);});
      if(id===46||id===47){
        if(id===46)cursor(px,py);else tilt(.5,.5);
        on(area,'keydown',e=>{const dir={ArrowLeft:[-.12,0],ArrowRight:[.12,0],ArrowUp:[0,-.12],ArrowDown:[0,.12]}[e.key];if(dir){e.preventDefault();handle(px+dir[0],py+dir[1]);}});
      }
    }
    if(id===40){
      const path=q('.path-area path'),dot=q('.path-dot'),p=path.getPointAtLength(0),area=q('.path-area');
      dot.style.transform='translate('+(p.x*area.clientWidth/360-dot.offsetWidth/2)+'px,'+(p.y*area.clientHeight/180-dot.offsetHeight/2)+'px)';
    }
    setLabel(guide[id].action);
    return {play,dispose(){disposed=true;abort.abort();resetTimers();cancelAnimations();}};
  }
  window.motionPlates={render,player,guide};
})();
</script><script>const id=29, stage=document.querySelector("#stage"), play=document.querySelector("#playDemo"), status=document.querySelector("#sampleStatus"),m=matchMedia("(prefers-reduced-motion: reduce)");let view;function mount(){view?.dispose();status.textContent="";play.textContent="스프링 놓기";const options={reduced:m.matches,status:text=>{status.textContent=text},playButton:play};stage.replaceChildren();motionPlates.render(id,stage,{paperImage:window.MotionFoundationMedia["media/paper-loop.webp"]});view=motionPlates.player(id,stage,options);}mount();play.addEventListener("click",()=>view.play());document.querySelector("#reset").addEventListener("click",mount);m.addEventListener("change",mount);</script></body></html>
```
