/* Engine `path` (DESIGN §13.1, §5.7): every selector starts with `.pa-` (state classes `.is-*` allowed). Package C.
   The garden path, its pieces (each its own colour, kept on the rail), the rail with ⟦K⟧, the lettuce, Puž Sporko,
   the adding tape. Motion is transform / opacity only; no filters. */

/* ---------------------------------------------------------------- ground */
.pa-grass { fill: #EEF7DC; stroke: #D3E8B5; stroke-width: 2; }
.pa-tuft { fill: none; stroke: #9CCB6B; stroke-width: 2.4; stroke-linecap: round; }
.pa-paper-sk { fill: #FFFBF1; stroke: #E8DDC4; stroke-width: 2; }
.pa-sk-line { stroke: #DCE8FF; stroke-width: 1.6; }
.pa-sk-margin { stroke: #FFC2CF; stroke-width: 2; }
.pa-pave { fill: #EDE8E0; stroke: #D8D0C3; stroke-width: 2; }
.pa-cobble rect { fill: #E2DBCF; stroke: #D3C9BA; stroke-width: 1.4; }

/* ---------------------------------------------------------------- the path */
.pa-stones circle { fill: #fff; opacity: .55; }
.pa-piece-glow { stroke: #FFE27A; stroke-linecap: round; opacity: .75; animation: pa-breathe 1.2s ease-in-out infinite; }
.pa-piece.is-ghost line { opacity: .7; }
.pa-joint { fill: #FFFBF1; stroke: #24263B; stroke-width: 2.6; }
.pa-joint.pa-k { fill: #24263B; }
.pa-joint.pa-chainj { fill: #fff; stroke-width: 2; }
.pa-joint.pa-start { fill: #FFC53D; }
.pa-sk-stroke { stroke: #3B4A6B; stroke-width: 4; stroke-linecap: round; }
.pa-sketch.is-glow .pa-sk-stroke { stroke: #B98200; }
.pa-name { font-size: 22px; }
.pa-fade { animation: pa-fade .5s ease-out; }
@keyframes pa-fade { from { opacity: 1; } 40% { opacity: .2; } }

/* draggable pieces (unfold / both t2+): the piece lies down flat while it is carried to the rail */
.pa-drag { cursor: grab; }
.pa-drag .pa-drag-flat { display: none; }
.pa-drag.is-dragging .pa-drag-path { display: none; }
.pa-drag.is-dragging .pa-drag-flat { display: inline; }
.pa-drag.is-dragging { opacity: .92; }
.pa-drag.is-armed .pa-drag-path line:nth-child(1) { stroke: #F5A300; stroke-width: 22px; }
.pa-drag.is-selected .pa-drag-path line:nth-child(1) { stroke: #F5A300; }

/* ---------------------------------------------------------------- the rail and the chain on it */
.pa-rail { stroke: #3B4A6B; stroke-width: 4; stroke-linecap: round; }
.pa-rail-tick { stroke: #3B4A6B; stroke-width: 2.4; stroke-linecap: round; }
.pa-lane { stroke: #9AA6BE; stroke-width: 3; stroke-linecap: round; }
.pa-onrail.pa-pop { animation: pa-pop .45s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center; }
.pa-onrail.pa-late { animation: pa-late .9s ease-out; }
.pa-lanebar.pa-pop { animation: pa-unroll .7s cubic-bezier(.3, 1.3, .5, 1); transform-box: fill-box; transform-origin: left center; }
@keyframes pa-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes pa-late { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
@keyframes pa-unroll { from { transform: scaleX(.05); opacity: .3; } }
.pa-arc { fill: none; stroke: #575B7C; stroke-width: 2.6; stroke-dasharray: 5 5; stroke-linecap: round; animation: pa-arc 1.6s ease-out forwards; }
@keyframes pa-arc { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.pa-board .st-rail-body { fill: #C9D2DE; }
.pa-board .st-rail-tip { fill: #5B6578; }

/* ---------------------------------------------------------------- tags, flags, badges, the clip */
.pa-tag-box { fill: #FFF6DC; stroke: #24263B; stroke-width: 2.4; }
.pa-tag-t { font-weight: 900; fill: #24263B; }
.pa-tag.is-used .pa-tag-box { fill: #DDF3D3; }
.pa-tag.is-used .pa-tag-t { fill: #3E6B2E; }
.pa-tag-ok { fill: none; stroke: #17A565; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.pa-bite { fill: #EEF7DC; stroke: #24263B; stroke-width: 2; }
.pa-sumflag { opacity: .5; }
.pa-sumflag.is-reached { opacity: 1; animation: pa-pop .45s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center bottom; }
.pa-stick.pa-plant { animation: pa-plant .4s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center bottom; }
@keyframes pa-plant { from { transform: translateY(-18px) scale(.8); opacity: 0; } }
.pa-badge-n { font-weight: 1000; fill: #fff; paint-order: stroke; stroke: #24263B; stroke-width: 3px; stroke-linejoin: round; }
.pa-badge-glow { fill: #FFE27A; opacity: .55; animation: pa-breathe 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pa-clip-wrong { animation: pa-snap .9s ease-in forwards; }
@keyframes pa-snap { 30% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
.pa-clip-ok { animation: pa-pop .45s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center; }
.pa-duz { stroke: #2A6EE5; stroke-width: 4; stroke-dasharray: 10 7; stroke-linecap: round; animation: pa-dash 1.4s linear infinite; }
@keyframes pa-dash { to { stroke-dashoffset: -34; } }

/* ---------------------------------------------------------------- Sporko, the lettuce, payoffs */
.pa-walking .pa-sporko.is-sitting { visibility: hidden; }
.pa-slime { fill: none; stroke: #BFE3FF; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.pa-slime.is-sparkle { stroke: #FFE27A; stroke-dasharray: 2 14; stroke-width: 10; animation: pa-dash .8s linear infinite; }
.pa-walker.pa-dance > svg { animation: pa-dance 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
@keyframes pa-dance { 25% { transform: rotate(-10deg) scaleY(1.06); } 75% { transform: rotate(10deg) scaleY(.95); } }
.pa-munching.is-gone { opacity: 0; transition: opacity .3s; }
.pa-crumb { animation: pa-crumb .65s ease-out forwards; }
@keyframes pa-crumb { to { transform: translate(var(--dx, 0), var(--dy, -12px)); opacity: 0; } }
.pa-goal-live.pa-hop { animation: pa-hop .35s ease-out; transform-box: fill-box; transform-origin: center bottom; }
@keyframes pa-hop { from { transform: translateY(-28px) scale(.8); opacity: 0; } }
.pa-tackica { animation: pa-land .6s cubic-bezier(.3, 1.5, .5, 1) backwards; }
@keyframes pa-land { from { transform: translateY(-60px); opacity: 0; } }

/* ---------------------------------------------------------------- gags and hints (mismatch is orange, never red) */
.pa-gap { stroke: #FF9636; stroke-width: 9; stroke-linecap: round; animation: pa-blink .3s steps(2) 3; }
.pa-wrong { opacity: .85; animation: pa-shake .35s ease-in-out 2; }
.pa-miss { fill: rgba(255, 150, 54, .25); stroke: #FF9636; stroke-width: 4; }
@keyframes pa-blink { 50% { opacity: .3; } }
@keyframes pa-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pa-hint-ring { fill: rgba(255, 197, 61, .28); stroke: #F5A300; stroke-width: 4; animation: pa-breathe .9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pa-hint-seg { stroke: #FFE27A; stroke-width: 26; stroke-linecap: round; opacity: .7; animation: pa-breathe .9s ease-in-out infinite; }
.pa-drop { stroke: #F5A300; stroke-width: 3; stroke-dasharray: 6 5; }
.pa-faint { fill: #FFE27A; opacity: .6; }
@keyframes pa-breathe { 50% { opacity: .35; } }
.st-tool.pa-hint-btn { animation: pa-btn-pulse .9s ease-in-out infinite; }
@keyframes pa-btn-pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 197, 61, .55); } }

/* ---------------------------------------------------------------- the adding tape in the wide dock */
.pa-dock { display: none; }
html[data-layout="wide"] .pa-dock:not([hidden]), html[data-layout="square"] .pa-dock:not([hidden]) { display: block; }
.pa-tape { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; background: #fff; border: 3px solid #24263B; border-radius: 16px; box-shadow: 0 4px 0 #24263B; }
.pa-term { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 6px; border-radius: 12px; border: 3px solid #24263B; background: var(--c, #FFF6DC); color: #fff; font-weight: 1000; font-size: 24px; box-sizing: border-box; }
.pa-term b { paint-order: stroke; -webkit-text-stroke: 1px #24263B; }
.pa-term.is-empty { background: #FFF6DC; border-style: dashed; }
.pa-term.is-q { background: #FFE9A8; color: #24263B; }
.pa-term.is-new { animation: pa-pop .45s cubic-bezier(.3, 1.5, .5, 1); }
.pa-op { font-weight: 1000; font-size: 24px; color: #24263B; }
.pa-chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; background: #fff; border: 3px solid #24263B; border-radius: 16px; box-shadow: 0 4px 0 #24263B; }
.pa-chip { position: relative; display: inline-grid; place-items: center; min-width: 50px; height: 34px; padding: 0 6px; border-radius: 17px; border: 3px solid #24263B; background: #F4F1EA; box-sizing: border-box; }
.pa-chip::before { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: var(--c); opacity: .35; }
.pa-chip b { position: relative; font-weight: 1000; font-size: 18px; color: #24263B; }
.pa-chip.is-on { background: var(--c); }
.pa-chip.is-on::before { display: none; }
.pa-chip.is-on b { color: #fff; paint-order: stroke; -webkit-text-stroke: 1px #24263B; }
.pa-chip i { position: absolute; right: -8px; top: -12px; font-style: normal; font-weight: 1000; font-size: 18px; color: #17A565; }

@media (prefers-reduced-motion: reduce) {
  .pa-piece-glow, .pa-badge-glow, .pa-hint-ring, .pa-hint-seg, .pa-duz, .pa-slime.is-sparkle, .pa-walker.pa-dance > svg { animation: none !important; }
}
html[data-motion="reduce"] .pa-piece-glow, html[data-motion="reduce"] .pa-badge-glow, html[data-motion="reduce"] .pa-hint-ring, html[data-motion="reduce"] .pa-hint-seg, html[data-motion="reduce"] .pa-duz, html[data-motion="reduce"] .pa-slime { animation: none !important; }
