html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#f1ddaf}*{box-sizing:border-box}#activity-root{width:100%;height:100dvh}#load-error{position:fixed;inset:auto 16px 16px;padding:20px;background:#fff9e9;color:#493020;z-index:1000;font:20px sans-serif}
.parade{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:clamp(8px,1.4vh,18px);padding:4px;color:#51391f;position:relative}
.parade-title{font-size:clamp(17px,2.5vmin,25px);line-height:1.15;text-align:center;margin:0;font-weight:600}
.parade-line{display:grid;grid-template-columns:repeat(6,minmax(56px,1fr));gap:8px;margin:0;padding:0;list-style:none;width:100%;max-width:700px;align-self:center}
.parade-place{min-width:0;position:relative}.parade-piece{font:inherit;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:clamp(68px,12vmin,110px);min-width:56px;min-height:56px;border:0;border-radius:0;background:transparent;color:#51391f;box-shadow:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;padding:0}.parade-piece img{width:89%;height:89%;object-fit:contain;pointer-events:none;position:relative;z-index:1;filter:drop-shadow(0 4px 4px #68481a24)}.parade-place-number{position:absolute;bottom:2px;left:6px;font-size:12px;line-height:1;opacity:.8}.parade-piece:focus-visible{outline:3px solid #61418a;outline-offset:3px}.parade-piece:disabled{cursor:default}.parade-piece::before{content:'';position:absolute;left:10%;bottom:0;width:80%;height:18px;border-radius:50%;background:radial-gradient(ellipse,#e3b94f88,transparent 70%);opacity:0;pointer-events:none}.parade-piece::after{content:'';position:absolute;bottom:0;left:calc(50% - 14px);width:28px;height:3px;border-radius:3px;background:#9b722a;opacity:0;pointer-events:none}.parade-piece[aria-pressed=true]::before,.parade-piece.is-target::before,.parade-piece.is-success::before{opacity:.8}.parade-piece[aria-pressed=true]::after,.parade-piece.is-target::after{opacity:1}.parade-piece.is-group::before{opacity:.3}.parade-piece.is-success img{filter:drop-shadow(0 4px 6px #cfaa4966)}
.parade-tray{display:flex;align-items:center;justify-content:center;gap:12px}.parade-choice{width:clamp(64px,10vmin,92px);height:clamp(64px,10vmin,92px)}.parade-prompt{font-size:clamp(15px,2.1vmin,19px);line-height:1.25;text-align:center;min-height:1.3em;margin:0}.parade-legend{font-size:14px;text-align:center;margin:0}.parade-unit{display:flex;align-items:center;justify-content:center;gap:4px;min-height:0}.parade-unit img{width:30px;height:30px}.parade-hint{display:flex;align-items:center;justify-content:center;gap:10px}.parade-hint[hidden]{display:none}
.parade-hand{position:fixed;z-index:19;width:66px!important;height:82px!important;max-width:none!important;max-height:none!important;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 4px #0003);transform-origin:20% 10%}.parade-hand[hidden],.parade-drag[hidden]{display:none}.parade-drag{position:fixed;z-index:20;width:64px!important;height:64px!important;max-width:none!important;max-height:none!important;pointer-events:none;object-fit:contain;filter:drop-shadow(0 5px 5px #0003)}
@media(max-width:760px){.parade-line{grid-template-columns:repeat(3,minmax(56px,1fr));max-width:340px;row-gap:16px}.parade-piece{height:68px}.parade-place:nth-child(3)::after{content:'↳';position:absolute;right:1px;bottom:-18px;font-size:20px;line-height:18px;color:#765321}.parade{gap:8px}.parade-legend{font-size:12px}}
@media(max-height:700px) and (orientation:portrait){.parade{gap:5px;padding:0}.parade-title{font-size:16px}.parade-piece{height:56px}.parade-choice{height:56px;width:56px}.parade-line{row-gap:13px;gap:6px}.parade-prompt{font-size:14px}.parade-legend{display:none}.parade-unit img{width:23px;height:23px}}
@media(orientation:landscape) and (max-height:620px){.parade{gap:6px}.parade-title{font-size:18px}.parade-piece{height:56px}.parade-choice{width:56px;height:56px}.parade-legend{display:none}}
@media(prefers-reduced-motion:no-preference){.parade-piece{transition:background .2s,border-color .2s}.parade-hand{transition:left 1.2s ease-in-out,top 1.2s ease-in-out}}

@media(prefers-reduced-motion:no-preference){.parade-drag.is-demo-drag{transition:left 1.2s ease-in-out,top 1.2s ease-in-out}}

.parade-fx{position:absolute;inset:0;pointer-events:none;z-index:85;overflow:hidden}.parade-spark{position:absolute;width:7px;height:7px;border-radius:50%;background:#eac569;pointer-events:none;animation:parade-spark 1.6s ease-out forwards}.parade-spark-pumpkin{width:22px;height:27px;border-radius:0;background:none;object-fit:contain}@keyframes parade-spark{0%{opacity:0;transform:translate(0,0) scale(.6)}38%{opacity:.85}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--turn)) scale(.8)}}@media(prefers-reduced-motion:reduce){.parade-fx{display:none}}
.parade-top{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.parade:not(.is-demo) .parade-title{display:none}.parade-hint{font-size:14px;gap:7px;flex-wrap:nowrap}.parade-hint>span{white-space:nowrap}.parade-unit img{width:38px;height:38px;object-fit:contain}
@media(max-width:760px){.parade[data-unit-size="2"] .parade-line{grid-template-columns:repeat(4,minmax(56px,1fr));column-gap:6px}.parade-place:nth-child(3)::after{content:none}.parade[data-unit-size="3"] .parade-place:nth-child(3)::after,.parade[data-unit-size="2"] .parade-place:nth-child(4)::after{content:'↳';position:absolute;right:1px;bottom:-16px;font-size:20px;line-height:18px;color:#765321}}
@media(max-width:600px) and (orientation:portrait){.parade{gap:6px}.parade-top{gap:5px}.parade-prompt{display:none}.parade-unit img{width:32px;height:32px}.parade-title{font-size:17px}}
@media(max-height:700px) and (orientation:portrait){.parade-top{gap:3px}.parade-unit img{width:28px;height:28px}.parade-piece{height:56px}.parade{gap:5px}.parade-hint{font-size:13px}}
@media(orientation:landscape) and (max-height:620px){.parade-prompt{display:none}.parade-top{gap:12px;flex-wrap:nowrap}.parade-unit img{width:30px;height:30px}}
